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
My current set up is that I have a main domain, let's call it platform.com. I help people set up their own stores where they can sell widgets. So my single instance of my app supports store1.com, store2.com, store3.com. I have all of this up and running and working with email logon and next-auth. I have just a couple of edits that I've done to next auth to support this and they mostly route around having a canonical NextAuthURL and use req.header.host for the url.
This all works great and my users end up in the same db and I separate them out by store using headers and have UserProfile that exists per store.
Now I'm trying to add on social sign in and I'm hitting a few roadblocks. 1. Facebook wants to know your url...you can add a bunch(I don't think programmatically) but they have to be defined in your facebook app. 2. Google only lets you add 10 urls.
So I'm kind of stuck routing all social sign in through platform.com to make administration easier. The problem is that if I do that the cookie will be written for platform.com and won't be picked up by store1.com. Maybe I should route session requests to platform.com? And do all requests through there so that even magiclinks go to platform.com first? If I do this I'll need to add more state so platform.com can redirect to store1-n.com based on where the user came from.
I'm just throwing this out for discussion and ideas. Love the library and it has helped me avoid a lot of headaches so far.
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
-
My current set up is that I have a main domain, let's call it platform.com. I help people set up their own stores where they can sell widgets. So my single instance of my app supports store1.com, store2.com, store3.com. I have all of this up and running and working with email logon and next-auth. I have just a couple of edits that I've done to next auth to support this and they mostly route around having a canonical NextAuthURL and use req.header.host for the url.
This all works great and my users end up in the same db and I separate them out by store using headers and have UserProfile that exists per store.
Now I'm trying to add on social sign in and I'm hitting a few roadblocks. 1. Facebook wants to know your url...you can add a bunch(I don't think programmatically) but they have to be defined in your facebook app. 2. Google only lets you add 10 urls.
So I'm kind of stuck routing all social sign in through platform.com to make administration easier. The problem is that if I do that the cookie will be written for platform.com and won't be picked up by store1.com. Maybe I should route session requests to platform.com? And do all requests through there so that even magiclinks go to platform.com first? If I do this I'll need to add more state so platform.com can redirect to store1-n.com based on where the user came from.
I'm just throwing this out for discussion and ideas. Love the library and it has helped me avoid a lot of headaches so far.
Beta Was this translation helpful? Give feedback.
All reactions