i'm having a bunch of cors issues when following the email password recipes and using https://try.su...
n
i'm having a bunch of cors issues when following the email password recipes and using https://try.supertokens.com as the connectionURI
r
Can I see the browser's console output?
n
sure there are a bunch of different errors and each time i fix one another one appears
but i'll show you the current one
if you'd like i can do a screenshare and explain over voice as well
r
how have you configured CORS on the backend?
n
so basically my client side is a react app running on https://localhost:3000
r
right
n
and my server side is a node express app running on https://localhost:3001/
i've been doing a bunch of junk so it's different now
but if i copy the tutorial exactly it doesn't work
so if i do this
does this look good to you?
r
ok so the issue is that you are querying
http
, but you have set the cors to
https
Just change all the http to https
n
where
on the client?
r
everywhere
n
so even in cors everywhere http?
r
where you have set https://localhost... make it http://localhost
n
i think ive done that and it will still break
but ok ill do that now
r
yup
n
fixed and still broken
r
can i see the cors setting now?
and what is the response headers of the OPTIONS request to the /session/refresh endpoint (in the network tab)
n
preflight working though
r
right. Have you put the supertokens middleware before or after the CORS middleware?
n
middleware is before cors
r
make it after CORS
n
ok i think i did that too
but 1 sec
r
yup
n
ok so i think cors might be working now
but why am i unauthorized?
is it because im not logged in?
r
Yes.
That’s expected
n
okay so now i look stupid
that's literally what the tutorial said..
i swear i did the tutorial twice exactly and it didn't work!
okay thanks i'm going to try and recreate it 1 more time to make sure there's not something else
r
Haha. Don’t worry about it. Happens to the best of us 🙂
n
just out of curiosity why does websiteBasePath need to have a value?
r
It doesn’t. The default is /auth. Which means that the Login form will show on /auth path.
n
okay i see
r
By setting it to “”, means that the login form will show on localhost:3000/
n
okay yeah that's what i would want okay perfect