You've already forked authentication-service
mirror of
https://github.com/matrix-org/matrix-authentication-service.git
synced 2025-08-07 17:03:01 +03:00
Save which user session created a compat session
This also exposes the user session in the GraphQL API, and allow filtering on browser session ID on the app session list.
This commit is contained in:
@@ -411,7 +411,7 @@ async fn user_password_login(
|
||||
|
||||
let session = repo
|
||||
.compat_session()
|
||||
.add(&mut rng, clock, &user, device, false)
|
||||
.add(&mut rng, clock, &user, device, None, false)
|
||||
.await?;
|
||||
|
||||
Ok((session, user))
|
||||
@@ -738,7 +738,14 @@ mod tests {
|
||||
// Complete the flow by fulfilling it with a session
|
||||
let compat_session = repo
|
||||
.compat_session()
|
||||
.add(&mut state.rng(), &state.clock, user, device.clone(), false)
|
||||
.add(
|
||||
&mut state.rng(),
|
||||
&state.clock,
|
||||
user,
|
||||
device.clone(),
|
||||
None,
|
||||
false,
|
||||
)
|
||||
.await
|
||||
.unwrap();
|
||||
|
||||
|
@@ -208,7 +208,14 @@ pub async fn post(
|
||||
|
||||
let compat_session = repo
|
||||
.compat_session()
|
||||
.add(&mut rng, &clock, &session.user, device, false)
|
||||
.add(
|
||||
&mut rng,
|
||||
&clock,
|
||||
&session.user,
|
||||
device,
|
||||
Some(&session),
|
||||
false,
|
||||
)
|
||||
.await?;
|
||||
|
||||
repo.compat_sso_login()
|
||||
|
Reference in New Issue
Block a user