Public Access
Compare commits
1
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
0e6bdb75db |
@@ -246,11 +246,7 @@ public sealed partial class DodoSshApp : Avalonia.Application
|
|||||||
knownHosts,
|
knownHosts,
|
||||||
deviceKeys,
|
deviceKeys,
|
||||||
|
|
||||||
// Difference 4: the system browser by intent, and the response by intent too rather than on a
|
SignInThroughBrowser(browser),
|
||||||
// loopback socket. See AndroidAuthorization for why the desktop's listener is not reused.
|
|
||||||
async (url, cancellationToken) => await ServerConnection
|
|
||||||
.SignInAsync(url, browser, TimeProvider.System, cancellationToken, ConfigureAndroidOidc)
|
|
||||||
.ConfigureAwait(false),
|
|
||||||
|
|
||||||
TimeProvider.System,
|
TimeProvider.System,
|
||||||
connections,
|
connections,
|
||||||
@@ -273,14 +269,7 @@ public sealed partial class DodoSshApp : Avalonia.Application
|
|||||||
|
|
||||||
updates: updates,
|
updates: updates,
|
||||||
|
|
||||||
// Signing in to Spelunk comes back the way signing in to DodoSSH does — by intent, to the same
|
spelunkAccounts: PhoneSpelunkAccounts(browser));
|
||||||
// registered scheme, at the dev.dodotech.dodossh:/callback Spelunk allows — and names this phone as
|
|
||||||
// the account's device list does, for difference 5's reason.
|
|
||||||
spelunkAccounts: new SpelunkAccounts(
|
|
||||||
browser,
|
|
||||||
path => new AndroidRedirectCallback(path),
|
|
||||||
TimeProvider.System,
|
|
||||||
PhoneEnvironment.DeviceName));
|
|
||||||
|
|
||||||
// Started rather than awaited: framework initialisation must not block on a schema migration. The
|
// Started rather than awaited: framework initialisation must not block on a schema migration. The
|
||||||
// view model shows its own progress and handles its own failures.
|
// view model shows its own progress and handles its own failures.
|
||||||
@@ -289,6 +278,23 @@ public sealed partial class DodoSshApp : Avalonia.Application
|
|||||||
return viewModel;
|
return viewModel;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Difference 4: the system browser by intent, and the response by intent too rather than on a loopback
|
||||||
|
/// socket. See AndroidAuthorization for why the desktop's listener is not reused.
|
||||||
|
/// </summary>
|
||||||
|
private static MainWindowViewModel.SignInHandler SignInThroughBrowser(AndroidBrowserLauncher browser) =>
|
||||||
|
async (url, cancellationToken) => await ServerConnection
|
||||||
|
.SignInAsync(url, browser, TimeProvider.System, cancellationToken, ConfigureAndroidOidc)
|
||||||
|
.ConfigureAwait(false);
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Signing in to Spelunk comes back the way signing in to DodoSSH does — by intent, to the same registered
|
||||||
|
/// scheme, at the dev.dodotech.dodossh:/callback Spelunk allows — and names this phone as the account's
|
||||||
|
/// device list does, for difference 5's reason.
|
||||||
|
/// </summary>
|
||||||
|
private static SpelunkAccounts PhoneSpelunkAccounts(AndroidBrowserLauncher browser) =>
|
||||||
|
new(browser, path => new AndroidRedirectCallback(path), TimeProvider.System, PhoneEnvironment.DeviceName);
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Difference 4: where the authorization response comes back to.
|
/// Difference 4: where the authorization response comes back to.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|||||||
Reference in new issue
Block a user