File tree Expand file tree Collapse file tree 1 file changed +4
-7
lines changed Expand file tree Collapse file tree 1 file changed +4
-7
lines changed Original file line number Diff line number Diff line change @@ -109,9 +109,9 @@ async def token_redirect(self, request: Request) -> RedirectResponse:
109
109
async with httpx .AsyncClient () as session :
110
110
response = await session .post (token_url , headers = headers , content = content , auth = auth )
111
111
token = self .oauth_client .parse_request_body_response (json .dumps (response .json ()))
112
- data = self .standardize (self .backend .user_data (token .get ("access_token" )))
112
+ token_data = self .standardize (self .backend .user_data (token .get ("access_token" )))
113
+ access_token = request .auth .jwt_create (token_data )
113
114
114
- access_token = request .auth .jwt_create ({** data , "scope" : self .scope })
115
115
response = RedirectResponse (self .redirect_uri or request .base_url )
116
116
response .set_cookie (
117
117
"Authorization" ,
@@ -123,9 +123,6 @@ async def token_redirect(self, request: Request) -> RedirectResponse:
123
123
return response
124
124
125
125
def standardize (self , data : Dict [str , Any ]) -> Dict [str , Any ]:
126
- # TODO: Create an issue for collecting all possible field names
127
- # and finish up this method and create a unit-test for each.
128
- # :https://github.com/python-social-auth/social-core/tree/master/social_core/backends
129
- data ["identity" ] = "%s:%s" % (self .provider , data .get ("id" ))
130
- data ["display_name" ] = data .get ("name" )
126
+ data ["provider" ] = self .provider
127
+ data ["scope" ] = self .scope
131
128
return data
You can’t perform that action at this time.
0 commit comments