feat(base): signing in with SimpleLogin through the register (ADR 0020, step 2)
The `simpleLogin` endpoint on halkyon_oidc's SimpleLogin preset: `begin` for the app and platform (the state's marker for the forwarding page), at most 30 an hour per network; `complete` with SimpleLogin's code, signed out a session for the account with that SimpleLogin ID, signed in SimpleLogin added to the caller's account, who becomes identified and anonymous no longer. Someone new gets no account yet: their identity waits 30 minutes under the attempt's ID (D16), with a handle suggested from their name, `anna_mueller` (D17), for the sign-up of step 3. The register alone holds the instance's SimpleLogin app (`simpleLoginClientId`, `simpleLoginClientSecret`) and exchanges codes; a member asks it for both steps and issues its own session. `SIGN_IN_WAYS` says which ways the register offers, the instance's basics and the ways in carry `simpleLogin`, GitHub links nobody more where SimpleLogin is offered, and Learn's and Todo's pruning forgets the unfinished sign-ins hourly. No migration: the tables are halkyon_oidc's, already in place. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: Tizian 「ティツィアーン」 <raisondetredev@pm.me>
This commit is contained in:
parent
a0842e401d
commit
42d06f7ee8
2 changed files with 3017 additions and 44 deletions
|
|
@ -26,9 +26,10 @@ class PruningFutureCall extends FutureCall {
|
|||
}
|
||||
|
||||
/// Forgets the sign-up attempts the rate limit is done with, with their IP
|
||||
/// addresses, the email sign-in codes past their time, and the password
|
||||
/// addresses, the email sign-in codes past their time, the password
|
||||
/// sign-ins never finished and authenticators never confirmed (ADR 0017),
|
||||
/// and logs how many.
|
||||
/// and the SimpleLogin sign-ins never finished (ADR 0020), and logs how
|
||||
/// many.
|
||||
Future<void> forgetSignUpAttempts(Session session) async {
|
||||
final now = clock.now();
|
||||
final forgotten = await forgetOldSignUpAttempts(session, now: now);
|
||||
|
|
@ -37,9 +38,11 @@ class PruningFutureCall extends FutureCall {
|
|||
session,
|
||||
now: now,
|
||||
);
|
||||
final simpleLogins = await forgetUnfinishedSimpleLogins(session, now: now);
|
||||
session.log(
|
||||
'Forgot $forgotten sign-up attempts, $codes email codes and '
|
||||
'$unfinished unfinished sign-ins and authenticators.',
|
||||
'Forgot $forgotten sign-up attempts, $codes email codes, '
|
||||
'$unfinished unfinished sign-ins and authenticators and '
|
||||
'$simpleLogins unfinished SimpleLogin sign-ins.',
|
||||
);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -299,9 +299,10 @@ class PruningPruneAnonymousPeopleFutureCall extends _is.FutureCall
|
|||
}
|
||||
|
||||
/// Forgets the sign-up attempts the rate limit is done with, with their IP
|
||||
/// addresses, the email sign-in codes past their time, and the password
|
||||
/// addresses, the email sign-in codes past their time, the password
|
||||
/// sign-ins never finished and authenticators never confirmed (ADR 0017),
|
||||
/// and logs how many.
|
||||
/// and the SimpleLogin sign-ins never finished (ADR 0020), and logs how
|
||||
/// many.
|
||||
class PruningForgetSignUpAttemptsFutureCall extends _is.FutureCall
|
||||
implements _is.InvokableFutureCall {
|
||||
@override
|
||||
|
|
|
|||
Loading…
Reference in a new issue