File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed
Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -338,7 +338,7 @@ impl OAuthClient {
338338 self . _access_token . read ( ) . unwrap ( ) . clone ( )
339339 } ;
340340 if let Some ( access_token) = cached_token {
341- if access_token. expires_at > now {
341+ if access_token. expires_at > ( now + chrono :: Duration :: seconds ( 60 ) ) {
342342 return Ok ( access_token. access_token ) ;
343343 } else if let Some ( refresh_expires_at) = access_token. refresh_expires_at {
344344 if let Some ( refresh_token) = access_token. refresh_token {
@@ -462,7 +462,7 @@ impl OAuthClient {
462462
463463 let token = match alcoholic_jwt:: validate ( token, key, validations) {
464464 Ok ( k) => k,
465- Err ( e ) => {
465+ Err ( _ ) => {
466466 return Err ( VerifyTokenError :: Forbidden )
467467 }
468468 } ;
@@ -496,7 +496,7 @@ impl OAuthClient {
496496 let now = Utc :: now ( ) ;
497497
498498 let access_token = {
499- if token. expires_at > now {
499+ if token. expires_at > ( now + chrono :: Duration :: seconds ( 60 ) ) {
500500 token
501501 } else if let Some ( refresh_expires_at) = token. refresh_expires_at {
502502 if let Some ( refresh_token) = & token. refresh_token {
You can’t perform that action at this time.
0 commit comments