You've already forked authentication-service
mirror of
https://github.com/matrix-org/matrix-authentication-service.git
synced 2025-11-20 12:02:22 +03:00
Add the user_id directly on oauth2_sessions and make the scope a text list
This commit is contained in:
@@ -296,9 +296,14 @@ async fn authorization_code_grant(
|
||||
}
|
||||
};
|
||||
|
||||
let Some(user_session_id) = session.user_session_id else {
|
||||
tracing::warn!("No user session associated with this OAuth2 session");
|
||||
return Err(RouteError::InvalidGrant);
|
||||
};
|
||||
|
||||
let browser_session = repo
|
||||
.browser_session()
|
||||
.lookup(session.user_session_id)
|
||||
.lookup(user_session_id)
|
||||
.await?
|
||||
.ok_or(RouteError::NoSuchBrowserSession)?;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user