user
01/06/2021, 11:56 AMteam-member
and would be valid for any subdomain of my tld.rp
01/06/2021, 11:57 AMuser
01/06/2021, 11:58 AMrp
01/06/2021, 11:58 AMrp
01/06/2021, 11:58 AMuser
01/06/2021, 11:59 AMrp
01/06/2021, 12:00 PMrp
01/06/2021, 12:01 PMrp
01/06/2021, 12:01 PMrp
01/06/2021, 12:01 PMuser
01/06/2021, 12:01 PMrp
01/06/2021, 12:02 PMuser
01/06/2021, 12:03 PMuser
01/06/2021, 12:04 PMrp
01/06/2021, 12:04 PMrp
01/06/2021, 12:04 PMrp
01/06/2021, 12:04 PMrp
01/06/2021, 12:05 PMuser
01/06/2021, 12:05 PMauth.my-domain.com
that would integrate with SuperTokens corerp
01/06/2021, 12:05 PMuser
01/06/2021, 12:06 PMrp
01/06/2021, 12:06 PMrp
01/06/2021, 12:06 PMrp
01/06/2021, 12:06 PMuser
01/06/2021, 12:08 PMrp
01/06/2021, 12:11 PMapi.example.com
. This API is provided by the supertokens-node SDK. On success, it would create an access and a refresh token, and associate them with api.example.com
.
The frontend SDK (supertokens-auth-react) would also add a few cookies on .example.com
, which can be used to determine if a session exists on w1.example.com
and w2.example.com
.
Then in w1.example.com
, on the client side, you would need to check if a session exists, and render appropriate content. Likewise for w2.example.com
.
Finally, you can add any role to the access token which can be read on w1 or w2.example.com, on the client side.
This implies that netlify would not be involved in checking for a JWT. Your client side code needs to do that via the supertokens-auth-react SDK. We have a doesSessionExist()
function that can be used for this.user
01/06/2021, 12:25 PMw1.example.com
and w2.example.com
are just static websites and are not aware of sessions or users. Netlify would provide the access control in front of these sites, but that depends on a valid JWT existing in the user's browser.
I don't really want to manage additional services for login (which is part of the attraction of the JAMStack for me).
Do you know of any SaaS that could handle the lifecycle of these JWTs? Okta and Auth-0 are both very enterprise-y, and overly complex.rp
01/06/2021, 12:26 PMrp
01/06/2021, 12:27 PMuser
01/06/2021, 12:31 PM