You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have a single provider (okta) that I want to redirect the user to, but I want to do this on the server (using Next.js middleware). However, signIn('okta') only works on the client.
Is there an easy way to determine what the url should be to redirect the user server-side? If not, would you be open to a PR that adds a new public method along the lines of getSignInUrl(provider) (would work on both the client and server), which signIn(provider) would use internally?
How to reproduce ☕️
N/A
Contributing 🙌🏽
Yes, I am willing to help implement this feature in a PR
This discussion was converted from issue #3667 on January 18, 2022 20:07.
Heading
Bold
Italic
Quote
Code
Link
Numbered list
Unordered list
Task list
Attach files
Mention
Reference
Menu
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
-
Description 📓
I have a single provider (okta) that I want to redirect the user to, but I want to do this on the server (using Next.js middleware). However,
signIn('okta')
only works on the client.Is there an easy way to determine what the url should be to redirect the user server-side? If not, would you be open to a PR that adds a new public method along the lines of
getSignInUrl(provider)
(would work on both the client and server), whichsignIn(provider)
would use internally?How to reproduce ☕️
N/A
Contributing 🙌🏽
Yes, I am willing to help implement this feature in a PR
Beta Was this translation helpful? Give feedback.
All reactions