Skip to content
Discussion options

You must be logged in to vote

Thanks for the ping. Unfortunately, there is not much NextAuth.js can do about it, since this is a limitation of OAuth providers (be it unintentional or not).

We recently created some guides on how to authenticate users in preview environments, I hope that helps: https://next-auth.js.org/deployment#securing-a-preview-deployment

Basically, you could use an environment variable to toggle between allowed providers, or even switch off the adapter when you are in a test/preview environment. Making sure that the actual login flow with OAuth will work is our library's responsibility, not your app's.

Otherwise, you could try to use something like MSW and mock the requests that NextAuth.js makes. …

Replies: 2 comments 4 replies

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
4 replies
@baptisteArno
Comment options

@balazsorban44
Comment options

@balazsorban44
Comment options

@baptisteArno
Comment options

Answer selected by baptisteArno
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Help
Labels
None yet
2 participants