1
0
mirror of https://github.com/matrix-org/matrix-authentication-service.git synced 2025-11-21 23:00:50 +03:00

Make the sign out buttons keep the current action context

This commit is contained in:
Quentin Gliech
2022-05-22 17:31:57 +02:00
parent af4f01b769
commit 99ac59bc5d
14 changed files with 69 additions and 37 deletions

View File

@@ -60,7 +60,10 @@ pub(crate) async fn get(
let ctx = ReauthContext::default();
let next = query.load_context(&mut conn).await?;
let ctx = if let Some(next) = next {
ctx.with_post_action(next)
// SAFETY: we should have an action only if we have a "next" context
// TODO: make that cleaner
let action = query.post_auth_action.unwrap();
ctx.with_post_action(next, action)
} else {
ctx
};