(fix): session id stuff
This commit is contained in:
parent
c51c0f2e83
commit
cd63882b9d
3 changed files with 24 additions and 7 deletions
|
|
@ -103,7 +103,11 @@ impl AppState {
|
|||
}
|
||||
|
||||
async fn login(State(state): State<AppState>) -> Redirect {
|
||||
Redirect::temporary(&state.tauth.auth_url(None))
|
||||
let session_id = std::time::SystemTime::now()
|
||||
.duration_since(std::time::UNIX_EPOCH)
|
||||
.map(|d| d.as_millis() as u64)
|
||||
.unwrap_or(0);
|
||||
Redirect::temporary(&state.tauth.auth_url(None, session_id))
|
||||
}
|
||||
|
||||
async fn callback(State(state): State<AppState>, uri: axum::http::Uri) -> Result<Response, AppError> {
|
||||
|
|
|
|||
Loading…
Reference in a new issue