https://supertokens.com/ logo
Hello all apologies if this has come up
a

acidHL

03/30/2023, 2:45 PM
Hello all, apologies if this has come up before. I did a search on here but didn't find quite the same issue. I am self hosting and using a react-native (expo) frontend. My /auth/signin api endpoint correctly returns st-access-token and st-refresh-token but the frontend SDK does not seem to report a session once done.
I have used both fetch and axios with addAxiosInterceptors(), and neither seems to have any impact. My apiDomain values all seem to match up too.
If anybody has any clues on how I can further debug how or why it picks up the session I'd apprecite it.
SuperTokens.getUserId() says no session after a valid response from signin, and neither do further API calls attach a bearer token.

https://cdn.discordapp.com/attachments/1091010315619139684/1091011768815452220/Screenshot_from_2023-03-30_15-50-52.png

Ok, I just rubber ducked myself here!
If anybody has this issue, the problem for me was that I had attached the interceptors to axios itself, when I was using axios.create
r

rp

03/30/2023, 3:54 PM
hey @acidHL - whats the configured apiDomain on the frontend? Also, can you show me the request headers for the sign in API call?
a

acidHL

04/01/2023, 1:51 PM
Hello, I actually managed to resolve this - it was a typo. I had applied the interceptors to axios instead of the output of axios.create() - its all working now. Thanks!
r

rp

04/01/2023, 2:05 PM
Great!