Redirection after Apple login #12664
Unanswered
LoickNosal
asked this question in
Help
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hello,
I have a NextJS application using NextAuth and I am facing a problem. I have configured my two providers Google and Apple and I have my login page /signin. After login, I want to redirect the user to the /home page. It works fine with Google however I am redirected to the root after a successful login with Apple '/'.
On the Google configuration site https://console.cloud.google.com/apis/ I have in Authorized JavaScript Origins my domain and my domain/api/auth/callback/google in Authorized redirect URIs. In the Apple configuration on https://developer.apple.com/ for my Service ID I have in Website Url my domain in domains and subdomains and my domain/api/auth/callback/apple in Redirect URLs.
Voici mon fichier next-auth.ts :
j'ai dans mon fichier routes.ts :
Voici ma page de login :
Environment 🖥
"next-auth": "^4.24.7",
"next": "^14.2.20",
In any case the connection works well with Apple and Google, it's just a redirection problem in the case of Apple.
Beta Was this translation helpful? Give feedback.
All reactions