Skip to content

Commit

Permalink
feat: support new token format of token['access_token']
Browse files Browse the repository at this point in the history
  • Loading branch information
hopomi authored Jul 25, 2023
1 parent d8d9439 commit d020c8f
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions casdoor_auth/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,8 @@ def toLogin(request):
def callback(request):
code = request.GET.get('code')
token = sdk.get_oauth_token(code)
if isinstance(token, dict) and 'access_token' in token:
token = token['access_token']
user = sdk.parse_jwt_token(token)
request.session['user'] = user
try:
Expand Down

0 comments on commit d020c8f

Please sign in to comment.