Many imorovments
This commit is contained in:
@@ -253,6 +253,24 @@ impl LaunchModel {
|
||||
};
|
||||
}
|
||||
|
||||
/// TRACES: FR-NC-1
|
||||
/// Begin a sign-in with an app password the user supplied directly.
|
||||
///
|
||||
/// The browser flow is the recommended route because it never exposes a
|
||||
/// credential to us, but it needs a browser and a round trip through one.
|
||||
/// An app password is what Nextcloud offers instead: device-scoped,
|
||||
/// individually revocable, and created by the user under Settings →
|
||||
/// Security. That makes it the workable option where no browser can
|
||||
/// complete the handshake.
|
||||
pub fn begin_direct_sign_in(&mut self, server: impl Into<String>) {
|
||||
self.server_url = normalise_server(&server.into());
|
||||
self.error = None;
|
||||
self.state = LaunchState::Busy {
|
||||
message: "Checking the credentials…".into(),
|
||||
session: None,
|
||||
};
|
||||
}
|
||||
|
||||
pub fn await_approval(&mut self, login_url: impl Into<String>) {
|
||||
self.status = Some("Approve the sign-in in your browser.".into());
|
||||
self.state = LaunchState::AwaitingApproval {
|
||||
|
||||
Reference in New Issue
Block a user