ezidam: store refresh token in cookie

This commit is contained in:
Philippe Loctaux 2023-03-18 16:43:33 +01:00
parent e99115e174
commit 1b2a9d1af7
2 changed files with 17 additions and 1 deletions

View file

@ -28,8 +28,9 @@ impl RefreshToken {
token: &str,
ip_address: &str,
user: &UserID,
duration_days: i64,
) -> Result<Option<()>, Error> {
let expires_at = Utc::now() + Duration::days(21);
let expires_at = Utc::now() + Duration::days(duration_days);
Ok(DatabaseRefreshTokens::insert(
conn,