rp_st
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.