Summary and description
Running yarn rw setup auth supertokens generates code:
const websiteDomain =
process.env.SUPERTOKENS_WEBSITE_DOMAIN || 'http://localhost:8910'
const apiDomain = process.env.SUPERTOKENS_API_DOMAIN || websiteDomain
const apiGatewayPath =
process.env.SUPERTOKENS_API_GATEWAY_PATH || '/.redwood/functions'
However the Supertokens auth guide includes only the following:
SUPERTOKENS_JWKS_URL=http://localhost:8910/.redwood/functions/auth/jwt/jwks.json
SUPERTOKENS_CONNECTION_URI=https://try.supertokens.io
What is the jwks.json file? From what I can tell it is being generated dynamically? I was somewhat confused when I haven't seen that file within the repo. Probably worth mentioning this in the docs.
Another issue, the docs don't mention the env variables that have to be set, based on the generated code. I assume the defaults are going to be working fine in dev, but what about production?
In particular this is not entirely clear:
SUPERTOKENS_WEBSITE_DOMAIN - this has to be set to the url of the web side when deployed? eg https://www.myapp.com
SUPERTOKENS_API_DOMAIN - does it have to be set to the api side url? https://api.myapp.com? And why does it default to websiteDomain?
- What exactly is
SUPERTOKENS_API_GATEWAY_PATH, and why does it default to /.redwood/functions? Can it be set to the api url?
Are you interested in working on this?
Summary and description
Running
yarn rw setup auth supertokensgenerates code:However the Supertokens auth guide includes only the following:
What is the
jwks.jsonfile? From what I can tell it is being generated dynamically? I was somewhat confused when I haven't seen that file within the repo. Probably worth mentioning this in the docs.Another issue, the docs don't mention the env variables that have to be set, based on the generated code. I assume the defaults are going to be working fine in dev, but what about production?
In particular this is not entirely clear:
SUPERTOKENS_WEBSITE_DOMAIN- this has to be set to the url of the web side when deployed? eghttps://www.myapp.comSUPERTOKENS_API_DOMAIN- does it have to be set to the api side url?https://api.myapp.com? And why does it default towebsiteDomain?SUPERTOKENS_API_GATEWAY_PATH, and why does it default to/.redwood/functions? Can it be set to the api url?Are you interested in working on this?