https://supertokens.com/ logo
#support-questions
Title
# support-questions
b

Bruno Diferente

03/22/2022, 1:04 PM
Hello there, I have a question in mind, My company is using supertokens for auth and we have to send cookies on behalf of react component to check if user is signed in and to refresh the session if ended
sending from CMS (joomla)
, however when this ajax call is made all the cookies are lost and some of them are killed
r

rp

03/22/2022, 1:05 PM
im going to need some more context about this to help out. It's quite vague
b

Bruno Diferente

03/22/2022, 1:08 PM
Sorry for disturbing you again 😄
How are you doing ? been while not asking 😄
r

rp

03/22/2022, 1:08 PM
Im good! How are you?
b

Bruno Diferente

03/22/2022, 1:09 PM
Well the backend team are trying to extrend supertokens for their reasons
Great
What I know for sure that we have 2 different front applications
We have part using CMS joomla
and another part with nextJS
We are using different containers for services and websites
Traefik as a reverse proxy / edge router
So people can navigate inside the website easily without notice the different between two applications
nextjs is working perfect when it comes to supertokens
But we want to extend it further more and let the cms check cookies and refresh session on behalf of React wrapper component
Cms team tried to make ajax calls to check cookies and refresh session if ended
However first call from the CMS ends with killing the cookies
PS: we are using NestJs + Supertokens as auth service
NB : everything works perfect in local
but when the deploy
this issue appears
r

rp

03/22/2022, 1:34 PM
hmm. Do you want to get on a call to debug this? It's very difficult for me to understand this situation this way.
b

Bruno Diferente

03/22/2022, 1:49 PM
Gimme a second please. Even I don't have the full context
Will check with them
They think CI CD issues
Local is working just fine
r

rp

03/22/2022, 1:54 PM
hmm. Alright!
b

Bruno Diferente

03/22/2022, 4:44 PM
Seems they will debug it alone because there is nothing wrong since everything is working perfect in local
Can i please have react repo link if it is open
wanna read how react components work
and can you please tell me how's the auth wrapper behavior
if someones accessToken expires
and he did not refresh the page
will the session be refreshed or should i add this behavior
I know that if the user refresh the page (the wrapper will refresh it on his behalf)
r

rp

03/22/2022, 5:00 PM
> Can i please have react repo link if it is open https://github.com/supertokens/supertokens-auth-react > and can you please tell me how's the auth wrapper behavior. will the session be refreshed or should i add this behavior The session will refresh automatically the next time they open the page, or if they call an API. From your point of view, session refreshing is totally transparent.
3 Views