https://supertokens.com/ logo
d

Dhr_RT

04/11/2022, 6:27 AM
After attempting to change all variables to env counterparts and setting up the system for release, I have triggered something that I cannot figure out. I have allowed all the "necessary' headers according to the warnings at some point - then I am a loop. I feel that there is a session lingering on which I cannot kill?
n

nkshah2

04/11/2022, 6:28 AM
After attempting to change all variables to env counterparts and setting up the system for release, I have triggered something that I cannot figure out. I have allowed all the "necessary' headers according to the warnings at some point - then I am a loop. I feel that there is a session lingering on which I cannot kill?
Hi, can you send the config you use when calling SuperTokens.init on the frontend and backend? (Stripping any API keys you may be using)
d

Dhr_RT

04/11/2022, 6:29 AM
sure
backend
Frontend
n

nkshah2

04/11/2022, 6:31 AM
What are the values set for
BACKEND_URL
,
FRONTEND_URL
,
REACT_APP_BACKEND_URL
and
REACT_APP_FRONTEND_URL
?
d

Dhr_RT

04/11/2022, 6:31 AM
Frontend
Backend
n

nkshah2

04/11/2022, 6:32 AM
And just to make sure, your react app does start on PORT 3000 correct?
d

Dhr_RT

04/11/2022, 6:32 AM
I do have this on my root file on NodeJS
n

nkshah2

04/11/2022, 6:33 AM
You dont need to add the CORS headers manually
Can you remove them and try?
d

Dhr_RT

04/11/2022, 6:33 AM
Sure
n

nkshah2

04/11/2022, 6:34 AM
Just to be clear, the part where you do
app.use(cors()
should stay
d

Dhr_RT

04/11/2022, 6:34 AM
yes
Let me set all the variables hard coded, instead of env variables
No luck, I will flip on debug mode
n

nkshah2

04/11/2022, 6:39 AM
What version of supertokens-node are you using?
d

Dhr_RT

04/11/2022, 6:39 AM
^9.1.2
n

nkshah2

04/11/2022, 6:39 AM
Could you follow this troubleshooting guide and let us know https://supertokens.com/docs/thirdpartyemailpassword/troubleshooting/how-to-troubleshoot
d

Dhr_RT

04/11/2022, 6:39 AM
Nothing here
n

nkshah2

04/11/2022, 6:40 AM
Oh give me a bit
d

Dhr_RT

04/11/2022, 6:41 AM
Sure, I will be going in transit now. I will respond slower.
n

nkshah2

04/11/2022, 6:58 AM
Can you post the code where you add the SuperTokens middleware?
And can you check if
cors
is being added before or after the middleware
Were you seeing the same error after switching to local variables or was the error different?
d

Dhr_RT

04/11/2022, 7:01 AM
same errors
I will change browsers
n

nkshah2

04/11/2022, 7:02 AM
Yep try it with Chrome, out of curiosity
d

Dhr_RT

04/11/2022, 7:02 AM
Chrome
It almost seems that I need to set the header manually
n

nkshah2

04/11/2022, 7:12 AM
The
cors
middleware should handle that for you. Do you see any errors in your API server on startup?
Can you also try moving your Swagger route after the supertokens middleware and seeing if the behaviour changes?
I mean this part
app.use('/', swaggerUI.serve...)
d

Dhr_RT

04/11/2022, 7:16 AM
I will try in a moment
OK, that worked lol
Nice catch
Now I have another issue, never encountered before
n

nkshah2

04/11/2022, 7:59 AM
In the backend SuperTokens.init, you have overridden
signInUpPOST
. In that snippet can you log something after calling
originalImplementation.signInUpPOST
and check if it gets to that point?
d

Dhr_RT

04/11/2022, 8:00 AM
sure
Wait, I will flush the system
n

nkshah2

04/11/2022, 8:01 AM
Also if you have a default error handler (after adding the SuperTokens error handler) you can print there and check if you are getting any specific errors
d

Dhr_RT

04/11/2022, 8:03 AM
It seems to be working now
I will have to check it out some more
thanks for you help so far
n

nkshah2

04/11/2022, 8:04 AM
Happy to help, this thread will be active for the next 24 hours so feel free to ask more questions here
2 Views