I created a redirect endpoint on my django app.
I normally am able to get query params from the url path but when this redirect happens, it appends the value # to the url. this stops me from being able to get the query params.
how do i retrieve access_token as a query params from this url?
/redirect/#access_token=ya29.a0AXooCgvXSv2-9x-4i6V
I tried using request.GET.get('access_token')
but it did not work.
I also printed request.META
but access_token is not in it
1
but when this redirect happens, it appends the value
#
to the url. this stops me from being able to get the query params.
That makes sense, since the part after the #
is not the query string, but the fragment. The browser does not send the fragment to the server, so you can not know what fragment has been send, unless you use some JavaScript that inspects the fragment, and for example makes an AJAX request with it.