You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I want to use React (javascript) to determine login status, but I can't access cookies from javascript due to http-only cookies.
I thought of actually making an HTTP request and using the response status value to determine the status, but I get a 401 error message in the browser developer console.
Should I create a cookie or local storage with the same expiration date and use that value to determine the status?
How can I determine the login status?
The text was updated successfully, but these errors were encountered:
I think the method you proposed is fine, but a better way would be to call /token/verify. However, as I mentioned in #191 you can't access this endpoint if you use http-only. I guess for now the only option is what you mentioned.
I want to use React (javascript) to determine login status, but I can't access cookies from javascript due to http-only cookies.
I thought of actually making an HTTP request and using the response status value to determine the status, but I get a 401 error message in the browser developer console.
Should I create a cookie or local storage with the same expiration date and use that value to determine the status?
How can I determine the login status?
The text was updated successfully, but these errors were encountered: