소스 검색

fix post-auth redirection

Turns out the next URL redirection got cleared from
the session before it gets used. Moved the logic
around to make sure that doesn't happen (#58).
pull/63/head
Chlod Alejandro 5 달 전
부모
커밋
903e27e9d8
No known key found for this signature in database GPG 키 ID: A1E67C59037B0CC1
1개의 변경된 파일과 2개의 추가작업 그리고 1개의 파일을 삭제
  1. +2
    -1
      src/copyvios/auth.py

+ 2
- 1
src/copyvios/auth.py 파일 보기

@@ -47,12 +47,13 @@ def oauth_login_end():
"https://meta.wikimedia.org/w/index.php", consumer_token, access_token
)

next_url = session.get("next", "/")
session.clear()
session["access_token"] = dict(zip(access_token._fields, access_token))
session["username"] = identity["username"]
session.permanent = True

return session.get("next", "/")
return next_url


def clear_login_session():


불러오는 중...
취소
저장