pub async fn login_user(&self, id: i64) {
        let value = self.session.get::<i64>("user_auth_session_id").await;

        if value != Some(id) {
            self.session.set("user_auth_session_id", id).await;
        }
    }
/// Sets the user id into the Session so it can auto login the user upon Axum request.
///
/// # Examples
/// ```rust no_run
///  auth.login_user(user.id).await;
/// ```
///
Sets the user id into the Session so it can auto login the user upon Axum request.
Sets the user id into the Session so it can auto login the user upon Axum request .
pub async fn login_user(&self, id: i64) {
        let value = self.session.get::<i64>("user_auth_session_id").await;
        if value != Some(id) {
            self.session.set("user_auth_session_id", id).await;
        }
    }
pub async fn login_user ( & self , id : i64 ) { let value = self . session . get :: < i64 > ( " " ) . await ; if value != Some ( id ) { self . session . set ( " " , id ) . await ; } }
Sets the user id into the Session so it can auto login the user upon Axum request.
Sets the user id into the Session so it can auto login the user upon Axum request .
&self
id
i64
&self
id
i64
examples
```rust no_run
auth.login_user(user.id).await;
```
` ` ` rust no_run auth . login_user ( user . id ) . await ; ` ` `