Skip to content

Commit

Permalink
Remove depracated chrono function
Browse files Browse the repository at this point in the history
  • Loading branch information
MaeIsBad committed Mar 8, 2024
1 parent b64f304 commit 41dbede
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/auth0/token.rs
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ impl Token {
// the exact issued_at (iat) and expiration (exp)
// reference: https://www.iana.org/assignments/jwt/jwt.xhtml
let issue_date: DateTime<Utc> = Utc::now();
let expire_date: DateTime<Utc> = Utc::now() + Duration::seconds(response.expires_in as i64);
let expire_date: DateTime<Utc> = Utc::now() + Duration::try_seconds(response.expires_in as i64).unwrap_or(Duration::max_value());

Ok(Self {
token: access_token,
Expand Down

0 comments on commit 41dbede

Please sign in to comment.