Passa al contenuto
Menu
È necessario essere registrati per interagire con la community.
La domanda è stata contrassegnata
1792 Visualizzazioni

For example: When users attempt to access 'host/aaa/bbb/ccc/ddd', after successful authentication by the OAuth provider, they should be redirected to 'host/aaa/bbb/ccc/ddd'. 

However, it redirects to  'host/web' every time. After examining the source code, I found that when constructing the authentication URL, the state parameter is included, but the "r" key in the state dictionary fails to retrieve the correct redirect URL. Therefore, it defaults to "web" every time. 
I have debugged the auth_oauth module, before redirecting to the oauth provider, the

r​ key from the state​ dict always keep default value('web'), that lead to the problem. Is this a bug or anything? 

class OAuthLogin(Home) #from auth_oauth controller
def get_state(self, provider):
redirect = request.params.get('redirect') or 'web'

# redirect: 'web'
#The request.params dictionary is an empty dictionary.

Avatar
Abbandona
Post correlati Risposte Visualizzazioni Attività
2
mag 25
17998
4
lug 17
9092
1
gen 25
1789
0
set 24
1202
1
set 24
1249