How to send refresh token to stactic web app frontend

I have been trying to implement cookie token auth in my React frontend app. But having problems with the refresh token not being set on my frontend client despite it being sent correctly from my backend. I read a few posts on this forum saying I need to use a custom domain due to onrender.com being a public domain. So I created custom domains for both my frontend and backend.

coachify.graytecknologies…com – Frontend
coachify-api.graytecknologies.com – Backend

I thought that changing the surnames would fix the issue but I was wrong the issue still arose. So I am now stuck not knowing how to get my react app to accept and hold onto my refresh token cookie can anyone help?

Hi there,

Do you see the set-cookie header being sent back at all from your Render API? What is it’s contents?

Regards,

Keith
Render Support, UTC+10 :australia:

Yes I tested in Postman and I am getting the set-cookie flag

But in my frontend its not being set

Hi there,

Can you provide the full value for the cookie, it’s okay to (redact) the token value.

Regards,

Keith
Render Support, UTC+10 :australia:

refresh_token=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJlbWFpbCI6ImphY29iQGdtYWlsLmNvbSIsInVzZXJfaWQiOiI2NTQxZDFhMTJiZTExOGU4MzJlN2EzY2YiLCJleHAiOjE2OTkwNjgxMjV9.vytjSFfwPBcyObtm1KENwiKybklVwQKVUgUqeRr6AWA; Domain=.graytecknologies.com; HttpOnly; Path=/; SameSite=lax; Secure

Hey Keith did you get a chance to look at this?

Hi there,

Looks okay to me. How are you debugging your front end?

Regards,

Keith
Render Support, UTC+10 :australia:

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.