fn new(user_agent: &str, email: &str) -> Result<Self, Error> {
        let exp = chrono::Utc::now()
            .checked_add_signed(chrono::Duration::seconds(REFRESH_TOKEN_MAX_AGE_SECS))
            .ok_or_else(|| {
                println!("could not make timestamp");
                Error::InternalError
            })?
            .timestamp();

        Ok(Self {
            user_agent: user_agent.into(),
            email: email.into(),
            exp,
        })
    }
/// Create a new refresh token.
Create a new refresh token.
Create a new refresh token .
fn new(user_agent: &str, email: &str) -> Result<Self, Error> {
        let exp = chrono::Utc::now()
            .checked_add_signed(chrono::Duration::seconds(REFRESH_TOKEN_MAX_AGE_SECS))
            .ok_or_else(|| {
                println!("could not make timestamp");
                Error::InternalError
            })?
            .timestamp();
        Ok(Self {
            user_agent: user_agent.into(),
            email: email.into(),
            exp,
        })
    }
fn new ( user_agent : & str , email : & str ) -> Result < Self , Error > { let exp = chrono :: Utc :: now ( ) . checked_add_signed ( chrono :: Duration :: seconds ( REFRESH_TOKEN_MAX_AGE_SECS ) ) . ok_or_else ( | | { println ! ( " " ) ; Error :: InternalError } ) ? . timestamp ( ) ; Ok ( Self { user_agent : user_agent . into ( ) , email : email . into ( ) , exp , } ) }
Create a new refresh token.
Create a new refresh token .
user_agent
&str
email
&str
user_agent
&str
email
&str