Next integration and social login #231
-
Hello there. First of all, thank you for this project 😀 At last an auth project that makes sens (or at least, that matches my own views about how an auth provider should be build 😅 ) One thing is puzzling me though. When following the documentation about nextjs integration, we get to understand that in this mode, nextjs will act as a bridge to our ory network instance. I think it's definitely a fantastic idea :
But, first issue arises when you try to connect a social provider : the redirect URI is always the project slug, and obviously, it cannot work, and didn't find a way to change this behaviour. Reading different issues and questions here, I'm having a hard time understanding what ORY wants us to do :
Did I miss something ? EDIT: sorry, maybe more context on "obviously it cannot work" |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
Hey there, thank you very much for the detailed description! It's true that the NextJS integration does not properly deal with social sign in. It is possible to make it work (the Ory Tunnel for example is able to do this), but we have not yet implemented it in the NextJS API. Generally speaking, when deploying to production, it is a good idea to use a custom domain instead, as you also get additional security safeguards using custom domains. You can customize the redirect URL using the |
Beta Was this translation helpful? Give feedback.
Hey there, thank you very much for the detailed description! It's true that the NextJS integration does not properly deal with social sign in. It is possible to make it work (the Ory Tunnel for example is able to do this), but we have not yet implemented it in the NextJS API.
Generally speaking, when deploying to production, it is a good idea to use a custom domain instead, as you also get additional security safeguards using custom domains. You can customize the redirect URL using the
?return_to
query parameter when initializing the login or registration flow in the Ory Console: https://console.ory.sh/projects/current/browser-redirects