feat: Implement support for prompt=create in the authorization code flow

This commit is contained in:
Ginger
2026-05-07 10:04:46 -04:00
parent 851d6e219f
commit 3c07857e1f
11 changed files with 112 additions and 40 deletions
+11
View File
@@ -18,6 +18,8 @@ pub struct AuthorizationCodeQuery {
pub response_mode: ResponseMode,
pub code_challenge: String,
pub code_challenge_method: CodeChallengeMethod,
#[serde(default)]
pub prompt: Option<Prompt>,
}
#[derive(Debug, Clone, Default, Deserialize, Serialize)]
@@ -36,6 +38,15 @@ pub enum CodeChallengeMethod {
S256,
}
#[derive(Debug, Clone, Deserialize, Serialize)]
#[serde(rename_all = "snake_case")]
#[non_exhaustive]
pub enum Prompt {
Create,
#[serde(other)]
Unknown,
}
#[derive(Debug, Clone, Deserialize, Serialize, PartialOrd, Ord)]
pub enum Scope {
Device(OwnedDeviceId),
+1
View File
@@ -245,6 +245,7 @@ impl Service {
let suffix = &self.services.config.new_user_displayname_suffix;
if !suffix.is_empty() {
displayname.push(' ');
displayname.push_str(suffix);
}