fix: don't attempt to change client token on auth
This commit is contained in:
parent
3fadbbba3d
commit
374765bd19
1 changed files with 2 additions and 1 deletions
|
@ -71,6 +71,7 @@ pub async fn authenticate(State(state): State<AppState>, Json(payload): Json<pro
|
|||
access_token: Set(access_token.clone()),
|
||||
created_at: Set(Utc::now()),
|
||||
}).exec(&state.db).await.unwrap();
|
||||
let client_token = payload.clientToken.unwrap_or(Uuid::new_v4());
|
||||
let profile = proto::Profile {
|
||||
name: u.name.clone(),
|
||||
id: u.uuid,
|
||||
|
@ -79,7 +80,7 @@ pub async fn authenticate(State(state): State<AppState>, Json(payload): Json<pro
|
|||
proto::AuthenticateResponse {
|
||||
accessToken: access_token,
|
||||
user: proto::User { id: u.uuid, username: u.name, properties: Some(vec![]) },
|
||||
clientToken: Uuid::new_v4().to_string(),
|
||||
clientToken: client_token.to_string(),
|
||||
availableProfiles: vec![profile.clone()],
|
||||
selectedProfile: profile,
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue