Redirect unauthenticated users to provider login page in Server Components #9672
Closed
quickbeard
started this conversation in
Ideas
Replies: 3 comments
-
Hello, I'm facing the same problem. Did you fixed it? |
Beta Was this translation helpful? Give feedback.
0 replies
-
Has anyone found a solution? |
Beta Was this translation helpful? Give feedback.
0 replies
-
I found the solution on this discussion: How to auto redirect to the provider login screen #4078 |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Goals
Background
redirect
function, something like thisif (!session) { return redirect("/api/auth/signin") }
.signIn
withuseEffect
like mentioned in this issue How to auto redirect to the provider login screen #4078, then it has to be a client component.Proposal
I'm sorry I don't think I can be any help here. Thank you!
Beta Was this translation helpful? Give feedback.
All reactions