File tree Expand file tree Collapse file tree 1 file changed +3
-2
lines changed
Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -270,15 +270,16 @@ async fn login_authorized(
270270) -> Result < impl IntoResponse , AppError > {
271271 csrf_token_validation_workflow ( & query, & cookies, & store) . await ?;
272272
273+ let client = reqwest:: Client :: new ( ) ;
274+
273275 // Get an auth token
274276 let token = oauth_client
275277 . exchange_code ( AuthorizationCode :: new ( query. code . clone ( ) ) )
276- . request_async ( & reqwest :: Client :: new ( ) )
278+ . request_async ( & client )
277279 . await
278280 . context ( "failed in sending request request to authorization server" ) ?;
279281
280282 // Fetch user data from discord
281- let client = reqwest:: Client :: new ( ) ;
282283 let user_data: User = client
283284 // https://discord.com/developers/docs/resources/user#get-current-user
284285 . get ( "https://discordapp.com/api/users/@me" )
You can’t perform that action at this time.
0 commit comments