mirror of
https://forgejo.ellis.link/continuwuation/continuwuity.git
synced 2026-11-27 19:07:33 +00:00
fix: Clear temporary scopes before building refresh response scope
Temporary scopes are dropped on token refresh, so the returned scope list should not advertise them.
This commit is contained in:
1 file changed
+2
-2
@@ -777,6 +777,8 @@ impl Service {
|
||||
panic!("refresh token is not current or previous for its session");
|
||||
}
|
||||
|
||||
session_info.temporary_scopes.clear();
|
||||
|
||||
let scope = session_info.scope_string(&refresh_token_info.device_id);
|
||||
|
||||
let new_access_token = DeviceToken::new_random().with_max_age(Self::ACCESS_TOKEN_MAX_AGE);
|
||||
@@ -791,8 +793,6 @@ impl Service {
|
||||
.await
|
||||
.expect("should be able to set token");
|
||||
|
||||
session_info.temporary_scopes.clear();
|
||||
|
||||
self.db.userdeviceid_oauthsessioninfo.put(
|
||||
(&refresh_token_info.user_id, &refresh_token_info.device_id),
|
||||
Json(session_info),
|
||||
|
||||
Reference in new issue
Block a user