When i shift my vue frontend to a public domain, I can not login anymore. I get an log error "WebSoc...
d
When i shift my vue frontend to a public domain, I can not login anymore. I get an log error "WebSocket connection to ... failed". The logs from the backend are okay. In the dashboard a new token is shown, but the frontend did not recieve this. I use vue behinde Traefik with the cors middleware. Do I have to add more options to Traefik?
r
hey @derbernd does the sign in request succeed? And if you do doesSessionExist after sign in, does that return true?
d
The request succeed:
Copy code
com.supertokens {t: "2023-05-16T08:48:03.006Z", message: "doesSessionExist: called", supertokens-website-ver: "16.0.9"}
logger.js:31 com.supertokens {t: "2023-05-16T08:48:03.007Z", message: "FrontToken.getTokenInfo: called", supertokens-website-ver: "16.0.9"}
logger.js:31 com.supertokens {t: "2023-05-16T08:48:03.007Z", message: "getFrontToken: called", supertokens-website-ver: "16.0.9"}
logger.js:31 com.supertokens {t: "2023-05-16T08:48:03.007Z", message: "getLocalSessionState: called", supertokens-website-ver: "16.0.9"}
logger.js:31 com.supertokens {t: "2023-05-16T08:48:03.008Z", message: "getFrontTokenFromCookie: called", supertokens-website-ver: "16.0.9"}
logger.js:31 com.supertokens {t: "2023-05-16T08:48:03.009Z", message: "getLocalSessionState: returning NOT_EXISTS since frontToken was cleared but lastAccessTokenUpdate exists", supertokens-website-ver: "16.0.9"}
logger.js:31 com.supertokens {t: "2023-05-16T08:48:03.009Z", message: "getFrontToken: Returning because sIRTFrontend != EXISTS", supertokens-website-ver: "16.0.9"}
logger.js:31 com.supertokens {t: "2023-05-16T08:48:03.009Z", message: "getLocalSessionState: called", supertokens-website-ver: "16.0.9"}
logger.js:31 com.supertokens {t: "2023-05-16T08:48:03.009Z", message: "getFrontTokenFromCookie: called", supertokens-website-ver: "16.0.9"}
logger.js:31 com.supertokens {t: "2023-05-16T08:48:03.010Z", message: "getLocalSessionState: returning NOT_EXISTS since frontToken was cleared but lastAccessTokenUpdate exists", supertokens-website-ver: "16.0.9"}
logger.js:31 com.supertokens {t: "2023-05-16T08:48:03.010Z", message: "doesSessionExist: access token does not exist locally", supertokens-website-ver: "16.0.9"}
r
Can I see the response headers of the sign in request?
d
I found the problem. It's correlated to the browser. It did't work, if I use brave on Linux. Brave on Mac works. Firefox on Linux works.
r
hmm. That's really strange. Is it a browser bug?
d
I don't know.
r
can i see the sign in response headers as shown on google chrome?
d
access-control-allow-credentials: true access-control-allow-headers: * access-control-allow-methods: * access-control-allow-origin: https://app.******** access-control-expose-headers: * cache-control: max-age=31536000,immutable content-length: 3510 content-type: application/javascript date: Wed, 17 May 2023 06:08:43 GMT etag: W/"db6-EsiQVU2KF6b5jaIfwkicg2RAq9U" vary: Origi
r
so no session tokens sent to the client?
d
from "Supertokens.tsx" i get:
Copy code
:authority: app.****
:method: GET
:path: /src/components/auth/Supertokens.tsx
:scheme: https
accept: */*
accept-encoding: gzip, deflate, br
accept-language: de-DE,de;q=0.9,en-US;q=0.8,en;q=0.7
cookie: st-last-access-token-update=1684133063262; ph_phc_fmJsC .....
if-none-match: W/"6aa-2CUYKKz1DdURJM45NztxNra7TrM"
origin: https://app.*****
referer: https://app.beta.******
sec-ch-ua: "Brave";v="111", "Not(A:Brand";v="8", "Chromium";v="111"
sec-ch-ua-mobile: ?0
sec-ch-ua-platform: "Linux"
sec-fetch-dest: script
sec-fetch-mode: cors
sec-fetch-site: same-origin
sec-gpc: 1
user-agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/111.0.0.0 Safari/537.36
r
im not sure i understand whats doing on.
Im talking about the sign in API response headers.
d
Where can I get these?
r
so when the user signs in from the browser, the browser makes an API cal to the backend. WHat is the response headers of that API call?
d
I don't know what I have changed, but now i works. I did not work on the login section of my app. Excuse my questions.
r
hm. Okay. If this error happens again, please feel free to reach out.
d
Okay, Thank you
29 Views