SimpleLogin takes only https redirect addresses, each registered exactly, so the instance's SimpleLogin app registers one page on the register's web server, /simplelogin-callback, which sends the browser on to the app that began the sign-in: a 303 to the desktop's loopback (127.0.0.1, a port per app) or the phone's scheme, chosen by the marker the state begins with (`<app>-<platform>.<rest>`, the rest 1 to 512 characters of base64url), from a fixed table, so it sends nobody anywhere else. It forwards the code or SimpleLogin's error (`deny`) with the state and nothing else, refuses anything malformed, repeated or not a GET with a page that repeats nothing it was given, and keeps and logs nothing (no-store, no referrer). It is built ahead of the sign-in itself so development can sign in through learn.halkyon.eu's page, which the development app registers too. Android's assetlinks.json for Halkyon Learn signed with the release key is answered by the Caddyfile on learn.halkyon.eu alone: the one domain the project's builds name, and the server knows no app's key. A root test holds its fingerprint to tool/release/android-certificate.sha256. The app's intent filter comes with the sign-in; iOS's association waits for an Apple team ID. The profile page's language choice and look move to common/web_page.dart, shared by both pages. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: Tizian 「ティツィアーン」 <raisondetredev@pm.me>
95 lines
3.2 KiB
Dart
95 lines
3.2 KiB
Dart
/// halkyon_base for a host's own code: its configuration
|
|
/// (`HalkyonBase.configure`), how people authenticate, the account's
|
|
/// deletion and the pruning, email sign-in's helpers, the instance's
|
|
/// basics, people's public profiles and their pages, the instance's register
|
|
/// (ADR 0016), signing in with a password and TOTP and getting back into an
|
|
/// account (ADR 0017), SimpleLogin's forwarding page (Halkyon Learn's ADR
|
|
/// 0020), and the module's models.
|
|
library;
|
|
|
|
export 'src/auth/account.dart';
|
|
export 'src/auth/auth_config.dart';
|
|
export 'src/auth/code_mail.dart';
|
|
export 'src/auth/email.dart';
|
|
export 'src/auth/github.dart';
|
|
export 'src/auth/github_sign_in_endpoint.dart' show gitHubAccountToSignIn;
|
|
export 'src/auth/identified.dart';
|
|
export 'src/auth/scopes.dart';
|
|
export 'src/common/network.dart';
|
|
export 'src/common/short_code.dart';
|
|
export 'src/generated/protocol.dart' hide Protocol;
|
|
export 'src/halkyon_base.dart';
|
|
export 'src/instance/data_location.dart';
|
|
export 'src/instance/source_code.dart';
|
|
export 'src/password/account_resets.dart'
|
|
show forgetLapsedResets, resetDelay, resetLapsesAfter;
|
|
export 'src/password/authenticators.dart'
|
|
show
|
|
forgetUnconfirmedAuthenticators,
|
|
maxAuthenticators,
|
|
unconfirmedAuthenticatorLifetime;
|
|
export 'src/password/key_proof.dart'
|
|
show
|
|
KeyProofPurpose,
|
|
PasswordProofPurpose,
|
|
authenticatorDigest,
|
|
canonicalInstanceUrl,
|
|
isAccountSignature,
|
|
keyProofMessage,
|
|
newPasswordDigest,
|
|
newPhraseDigest,
|
|
passwordIdentity,
|
|
publicInstanceUrlOf;
|
|
export 'src/password/password_config.dart';
|
|
export 'src/password/passwords.dart'
|
|
show
|
|
gitHubSignInFreshFor,
|
|
isNewPassword,
|
|
isPasswordSetup,
|
|
newPasswordCosts,
|
|
passwordGroup,
|
|
passwordMethod,
|
|
signInChallengeLifetime,
|
|
signsInWithPassword,
|
|
wrappedKeysLength;
|
|
export 'src/profile/link_verification.dart';
|
|
export 'src/profile/profile_page.dart' show addProfilePageRoute, profilePage;
|
|
export 'src/profile/profile_rules.dart'
|
|
show
|
|
accountDomain,
|
|
avatarPath,
|
|
avatarStorage,
|
|
isHandle,
|
|
maxAvatarBytes,
|
|
operatorAccountDomain,
|
|
profilePageUrl,
|
|
reservedHandles;
|
|
export 'src/profile/profiles.dart';
|
|
export 'src/register/account_register.dart';
|
|
export 'src/register/accounts_mode.dart';
|
|
export 'src/register/deletion_notices.dart'
|
|
show MemberNotifier, deliverDeletionNotices;
|
|
export 'src/register/instance_routes.dart';
|
|
export 'src/register/member_pruning.dart';
|
|
export 'src/register/people.dart' show issueSession;
|
|
export 'src/register/sessions_ended.dart'
|
|
show AccountSessionsEnded, deliverSessionNotices;
|
|
export 'src/simplelogin/simplelogin_callback.dart'
|
|
show
|
|
addSimpleLoginCallbackRoute,
|
|
simpleLoginCallbackPath,
|
|
simpleLoginReturns;
|
|
export 'src/srp/srp_group.dart';
|
|
export 'src/srp/srp_math.dart' show numberOf, padded;
|
|
export 'src/srp/srp_server.dart'
|
|
show
|
|
SrpAccepted,
|
|
SrpChallenge,
|
|
SrpRefusal,
|
|
SrpRefused,
|
|
SrpVerification,
|
|
srpChallenge,
|
|
srpVerify;
|
|
export 'src/totp/base32.dart';
|
|
export 'src/totp/recovery_codes.dart';
|
|
export 'src/totp/totp.dart';
|