Multi-Tenant Authentication Across Domains in Next.js 14
Unanswered
Mackenzie River Husky posted this in #help-forum
Original message was deleted.
3 Replies
Original message was deleted
That’s not possible. You cannot share cookies, or literally anything, between domains. To the browsers, the two domains are two distinct applications so browsers ensure data cannot be leaked from one app to the other.
Mackenzie River Husky
In this article (https://roshancloudarchitect.me/sharing-jwt-tokens-between-different-domains-a-secure-approach-using-angular-and-c-4a0b05175947), they implement this concept, so theoretically, it should be possible if I understand correctly. However, the tech stack here is completely different. Based on this, I’d think it should be achievable.
Mackenzie River Husky
I need to implement something similar to this in NextAuth: https://rahulthinking9.medium.com/cross-domain-sign-in-without-sso-f0a0e9eaa702
Does anyone have experience with this? I’d be very grateful for any help.
Does anyone have experience with this? I’d be very grateful for any help.