跳至內容
選單
此問題已被標幟
1778 瀏覽次數

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.

頭像
捨棄
相關帖文 回覆 瀏覽次數 活動
2
5月 25
17958
4
7月 17
9069
1
1月 25
1764
0
9月 24
1176
1
9月 24
1218