You should not pass an access token to the query string, for example /?token=my_token. This is not a safe method and is definitely not recommended.
Some other approaches you can use are as follows:
-1: server_access_token
HTTPS.
. , . , .
class MySocialApplicationRedirectView(View):
def get(self, request, *args, **kwargs):
response = HttpResponseRedirect('/accounts/profile/')
response['X-Auth-Token'] = 'my_server_access_token'
return response
. .
-2: server_access_token cookie
- server_access_token cookie @Ben.
response.set_cookie() server_access_token cookie, cookie .
class MySocialApplicationRedirectView(View):
def get(self, request, *args, **kwargs):
response = HttpResponseRedirect('/accounts/profile/')
response.set_cookie(key, value='my_server_access_token', ..other parameters )
return response
.. ( , ) HTTPS.