How to show a spinner while auth.js is authenticating with the provider? #11249
Unanswered
dkingtransform
asked this question in
Help
Replies: 1 comment
-
I think if you use a while loop you could do it propperly. I didn't tried it but it should. |
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.
-
Hello,
I'm using Next.js (App Router) and Auth.js (5.0) to authenticate with a custom identity provider. I've got the authentication working, but if the user is already logged in, it takes a few seconds to validate that, during which I'd like to provide some feedback to the user, like a spinner on the login button. However, because my login page is a server-side page, I'm unable to show a spinner and if I change the page to "use client" I run into issues with the async signIn call.
I'm fairly new to React/Next so I think I'm just missing a best practice pattern for this sort of thing? Can anyone provide some insight?
Thanks.
Beta Was this translation helpful? Give feedback.
All reactions