DEV Community

loading...

Discussion on: Adding Authentication(Auth0) to Your Laravel 7 Application

Collapse
ycore profile image
y-core • Edited

Hi Mohammad,

I followed the tutorial, created a new Laravel App on a local vagrant homestead box. It runs succesfully, but get the following error after Login authentication of registered user. This error appears on both the /login and /logout routes.

Client error: `POST https://<MYSUBDOMAIN>.eu.auth0.com/oauth/token` resulted in a `401 Unauthorized` response: {"error":"access_denied","error_description":"Unauthorized"}

Sequence:
https://auth.app is hosted on local vagrant homestead

  1. Click Login: https://auth.app/login

  2. Redirects: https://<MYSUBDOMAIN>.eu.auth0.com/authorize?scope=openid%20profile%20email&response_mode=query&response_type=code&redirect_uri=https%3A%2F%2Fauth.app%2Fauth0%2Fcallback&state=5f1c14b651e973.44938199&client_id=<CLIENTID>

  3. Redirects: https://auth.app/auth0/callback?code=wQqvLXGj1UgxfjxN&state=5f1c14d1447417.08360011

  4. Receive above error message

Could you assist to resolve the issue, please?

Collapse
shahbaz17 profile image
Mohammad Shahbaz Alam Author

Hi y-core,

Sure.

Can you share what you have written in Allowed callback URLs and Allowed Logout URLs?

Forem Open with the Forem app