I am trying to integrate Spotify Authorization flow (to gain access and refresh tokens) into my Django app. For this I have setup two Django endpoints - one for spotify login and another for spotify callback.
The login endpoint redirects to the spotify authorization endpoint, which requires the user to login into their spotify account and grant permissions.
This is followed by the Spotify API redirecting to the callback view in my Django app. Along with redirecting, the API sends a get variable, that is further utilised by the callback view to gain access and refresh tokens.
I need to store these tokens for each user of my website and for that I need to gain access to the user id. However the request.session variable always comes in empty in the callback view. Suggestions for gaining access to the request.session variable?