Replies: 1 comment 4 replies
-
Have you checked the applications logs on Heroku? |
Beta Was this translation helpful? Give feedback.
4 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
My API works in localhost but when I deploy to Heroku, I get message "E_UNAUTHORIZED_ACCESS: Unauthorized access".
I am using a same database, then is a same user and password (local and heroku).
My login
const email = ctx.request.input('email') const password = ctx.request.input('password ') const token = await ctx.auth.use('api').attempt(email, password ) return token;
Login works fine (localhost and heroku)
But, when I call any authenticate route I get a message E_UNAUTHORIZED_ACCESS: Unauthorized access raised by
throw new AuthenticationException
A message is generate by that code (Auth.js):
`protected async authenticate(auth: HttpContextContract['auth'], guards: (keyof GuardsList)[]) {
/**
* Hold reference to the guard last attempted within the for loop. We pass
* the reference of the guard to the "AuthenticationException", so that
* it can decide the correct response behavior based upon the guard
* driver
*/
let guardLastAttempted: string | undefined
}`
Details:
Anybody know what is happening?
Beta Was this translation helpful? Give feedback.
All reactions