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

Show consent page on prompt=consent

This commit is contained in:
Quentin Gliech
2022-04-29 14:10:45 +02:00
parent b3509cf8e2
commit 9681948aa8

View File

@@ -381,8 +381,17 @@ pub(crate) async fn get(
)
.await?)
}
(Some(_), Some(Prompt::Login | Prompt::Consent | Prompt::SelectAccount)) => {
// We're already logged in but login|consent|select_account was asked, reauth
(Some(_), Some(Prompt::Consent)) => {
// We're already logged in but consent was asked
txn.commit().await?;
let next: ConsentRequest = next.into();
let next = next.build_uri()?;
Ok(Redirect::to(&next.to_string()).into_response())
}
(Some(_), Some(Prompt::Login | Prompt::SelectAccount)) => {
// We're already logged in but login|select_account was asked, reauth
// TODO: better pages here
txn.commit().await?;