Skip to content

Avoid signin redirect page to api provider #1009

Answered by jaaneh
wilkersoh asked this question in Help
Discussion options

You must be logged in to vote

It's a bit hard to understand exactly what you want here, but If you're wanting the sign in to be approved and everything without a redirect to the provider's page, you can't. You have to get consent from the user that is signing in through the provider's OAuth login page, then redirected back to your OAuth redirect URL.

If you're talking about not going to the Next-Auth signin provider page but rather directly to the OAuth provider page, you can pass the provider name directly to the signIn() method like this:

<button onClick={() => signIn()}>Sign in</button> // Redirects to sign in page when clicked
<button onClick={() => signIn('google')}>Sign in with Google</button> // Starts Google O…

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@wilkersoh
Comment options

Answer selected by wilkersoh
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