Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"access_denied" when Account Link Extension is enabled #1384

Closed
6 tasks done
zeelmodi-simform opened this issue Aug 22, 2023 · 6 comments
Closed
6 tasks done

"access_denied" when Account Link Extension is enabled #1384

zeelmodi-simform opened this issue Aug 22, 2023 · 6 comments

Comments

@zeelmodi-simform
Copy link

zeelmodi-simform commented Aug 22, 2023

Checklist

Description

When I try to login using auth0 into my app I'm getting access_denied error and unable to move forward in the application.
If I disable Account Link Extension from Rules login is working perfectly fine. Please refer to the following image:
image

Here I'm trying to login with my github account and I'm being redirected to following URL:
http://localhost:3000/api/auth/callback?error=access_denied&error_description=Cannot%20find%20module%20%27request%402.56.0%27%0ARequire%20stack%3A%0A-%20%2Fdata%2Fio%2Fnode18%2Fd59cd921-d636-41df-98a6-ca328ec947a0%2Fwebtask.js&state=eyJyZXR1cm5UbyI6Ii9wcm9maWxlIn0

Error I'm getting in console:
image

This is how it looks like in Auth0 Real-time Webtask Logs

image

Reproduction

Steps are as mentioned above

Additional context

No response

nextjs-auth0 version

^3.0.1

Next.js version

^13.4.18

Node.js version

v16.15.1

@adamjmcgrath
Copy link
Contributor

Hi @zeelmodi-simform - thanks for raising this

The error you've shared says the following:

Cannot find module '[email protected]'
Require stack:
- /data/io/node18/d59cd921-d636-41df-98a6-ca328ec947a0/webtask.js

This means that your Account Link Extension is failing with Cannot find module '[email protected]'

This is not an SDK issue, but you could try changing the Rule's Node runtime to Node 16 which should resolve the issue.

The issue has also been raised here https://community.auth0.com/t/auth0-account-link-error-with-importing-modules/114153 - which is the best place to follow for any progress.

@zeelmodi-simform
Copy link
Author

@adamjmcgrath - thank you for your response. I checked the community post but no one has responded and as you suggested changing rule's node runtime, the option is not provided over dashboard

image

I tried adding this extension by following this doc:
https://auth0.com/docs/customize/extensions/account-link-extension

@adamjmcgrath
Copy link
Contributor

adamjmcgrath commented Aug 22, 2023

Hi @zeelmodi-simform - I've created an issue here auth0-extensions/auth0-account-link-extension#163

There's nothing this SDK can do to fix that rule unfortunately

@zeelmodi-simform
Copy link
Author

Hi @zeelmodi-simform - I've created a issue here auth0-extensions/auth0-account-link-extension#163

There's nothing this SDK can do to fix that rule unfortunately

@adamjmcgrath Thanks for your attention to this issue. I appreciate your effort!

@zeelmodi-simform
Copy link
Author

zeelmodi-simform commented Aug 23, 2023

@adamjmcgrath I'm facing a weird issue related to Auth0

Initially when I start the app I'm being redirected to 404 page.
image

But when I save any of the files, I am able to see my home page!
image

Now another issue is I've deployed it to vercel and on initial load it is working absolutely fine but when I try to navigate to /profile it is not redirecting me to auth0 login but in my local it is working as expected.

You can refer my repository: https://github.com/zeelmodi-simform/nextjs-sso-implementation-poc

Also found issue on community:
https://community.auth0.com/t/nextjs-404-page-when-accessing-api-auth-login/110685

@zeelmodi-simform
Copy link
Author

@adamjmcgrath I found the reason why I'm being redirected to 404 page, because request to /api/auth/me are failing
image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants