feat(app): adding SimpleLogin to an account (ADR 0020, D21, D23)
halkyon_app reads where the device's person stands with SimpleLogin (nothing to show, linked, or missing) and shows it in SimpleLoginSection, which each app places above the password part: Add SimpleLogin, once added one more way in. GitHub is added to nobody where SimpleLogin is offered, and Learn's Profile offers an anonymous person SimpleLogin alone there (D23). No cut-off day, reminder or banner (D24): with the developer the only person on learn.halkyon.eu, the cut-off is the operator taking GitHub's OAuth app out of the deploy's settings once that account has SimpleLogin. ADR 0020 records it and drops step 5. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: Tizian 「ティツィアーン」 <raisondetredev@pm.me>
This commit is contained in:
parent
3a93dc4fd8
commit
fad12b4411
1 changed files with 829 additions and 77 deletions
|
|
@ -21,10 +21,12 @@ final class _MemoryStorage() implements ClientAuthSuccessStorage {
|
|||
|
||||
/// An instance's halkyon_base as the network shows it: anonymous sign-ins
|
||||
/// get `anonymous-token`, its basics offer GitHub (and passwords while
|
||||
/// [passwords]), and a sign-up makes Ben, signed in with `ben-token`.
|
||||
/// [passwords], SimpleLogin while [simpleLogin]), and a sign-up makes Ben,
|
||||
/// signed in with `ben-token`.
|
||||
final class _Instance() {
|
||||
/// Whether its basics offer password sign-in.
|
||||
/// Whether its basics offer password sign-in, and SimpleLogin.
|
||||
bool passwords = false;
|
||||
bool simpleLogin = false;
|
||||
|
||||
static final anonymous = UuidValue.withValidation(
|
||||
'0191f0c4-1111-7000-8000-000000000001',
|
||||
|
|
@ -54,6 +56,7 @@ final class _Instance() {
|
|||
sourceCodeUrl: 'https://code.example.org/learn',
|
||||
minimumAppBuild: 1,
|
||||
passwordSignIn: passwords,
|
||||
simpleLogin: simpleLogin,
|
||||
).toJson(),
|
||||
),
|
||||
200,
|
||||
|
|
@ -121,7 +124,8 @@ void main() {
|
|||
);
|
||||
|
||||
test('tells what the instance offers from its basics: GitHub sign-in, '
|
||||
'and linking GitHub to people only where passwords are not', () async {
|
||||
'and linking GitHub to people only where neither passwords nor '
|
||||
'SimpleLogin are (ADR 0020, D23)', () async {
|
||||
expect(
|
||||
await gateway.gitHubOffer(),
|
||||
const GitHubOffer(signIn: true, linking: true),
|
||||
|
|
@ -139,6 +143,14 @@ void main() {
|
|||
hasLength(2),
|
||||
reason: 'one read of the basics each',
|
||||
);
|
||||
|
||||
instance
|
||||
..passwords = false
|
||||
..simpleLogin = true;
|
||||
expect(
|
||||
await gateway.gitHubOffer(),
|
||||
const GitHubOffer(signIn: true, linking: false),
|
||||
);
|
||||
});
|
||||
|
||||
test("puts the instance's refusals of GitHub as the app's problems", () {
|
||||
|
|
|
|||
Loading…
Reference in a new issue