You've already forked authentication-service
mirror of
https://github.com/matrix-org/matrix-authentication-service.git
synced 2025-07-31 09:24:31 +03:00
data-model: make the access token expiration optional
This commit is contained in:
@ -187,7 +187,9 @@ impl OAuth2SessionMutations {
|
||||
.add(&mut rng, &clock, &session, access_token, ttl)
|
||||
.await?;
|
||||
|
||||
let refresh_token = if !permanent {
|
||||
let refresh_token = if permanent {
|
||||
None
|
||||
} else {
|
||||
let refresh_token = TokenType::RefreshToken.generate(&mut rng);
|
||||
|
||||
let refresh_token = repo
|
||||
@ -196,8 +198,6 @@ impl OAuth2SessionMutations {
|
||||
.await?;
|
||||
|
||||
Some(refresh_token)
|
||||
} else {
|
||||
None
|
||||
};
|
||||
|
||||
Ok(CreateOAuth2SessionPayload {
|
||||
|
Reference in New Issue
Block a user