If I am using Django REST framework for session authentication
https://www.django-rest-framework.org/api-guide/authentication/
And React on the frontend, I am wondering how I can determine if I my session is active in Django in React? I'm assuming that the session is implemented via setting a cookie in the clients browser, so that every time a request is sent from the client it will have this cookie in the header, which Django automatically reads from. If this is the case, what is the best way to access this cookie? Or rather, what is the ideal way to check if a user is still authenticated directly? Right now I can send a request to an endpoint and if I am not authenticated, it will throw a 403 error, but this is not an elegant way to check logged in status on the frontend, in my opinion.