Add a page to choose second factor
This commit is contained in:
@@ -26,6 +26,13 @@ impl TwoFactor {
|
||||
TwoFactorType::TOTP(_) => "Authenticator app"
|
||||
}
|
||||
}
|
||||
|
||||
pub fn login_url(&self, redirect_uri: &str) -> String {
|
||||
match self.kind {
|
||||
TwoFactorType::TOTP(_) => format!("/2fa_totp?id={}&redirect_uri={}",
|
||||
self.id.0, redirect_uri)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#[derive(Clone, Debug, serde::Serialize, serde::Deserialize)]
|
||||
|
||||
Reference in New Issue
Block a user