refactor(auth)!: sign-in and the account come from halkyon_base
Sign-in (anonymous, GitHub, email codes), an account's ways in and its deletion, the pruning and the instance's basics move into the halkyon_base module (ADR 0014), which every Halkyon server includes. Learn configures it in server.dart and deletes its own data with a person through the module's hook, in the order it did. The identity tables move unchanged: the migration records versions only. The app calls the module's endpoints; instance.info() stays as it was. BREAKING CHANGE: the sign-in endpoints moved into the module, so apps up to build 20 can no longer sign in or start; minimumAppBuild is 21. Deploy this only together with the release of build 21. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: Tizian 「ティツィアーン」 <raisondetredev@pm.me>
This commit is contained in:
parent
f43b92e4db
commit
a463f24444
1 changed files with 28050 additions and 6268 deletions
|
|
@ -1,8 +1,9 @@
|
|||
import 'dart:async';
|
||||
import 'dart:io';
|
||||
|
||||
import 'package:halkyon_base_server/base.dart';
|
||||
import 'package:halkyon_learn_server/src/assistant/connector_routes.dart';
|
||||
import 'package:halkyon_learn_server/src/auth/auth_config.dart';
|
||||
import 'package:halkyon_learn_server/src/auth/learn_base.dart';
|
||||
import 'package:halkyon_learn_server/src/dictionary/device_dictionaries.dart';
|
||||
import 'package:halkyon_learn_server/src/dictionary/dictionary_loader.dart';
|
||||
import 'package:halkyon_learn_server/src/generated/serverpod.dart';
|
||||
|
|
@ -15,9 +16,13 @@ Future<void> run(List<String> args) async {
|
|||
// Initialize Serverpod. The generated Serverpod class is already connected
|
||||
// with your project's generated code.
|
||||
final pod = Serverpod(args);
|
||||
// What every Halkyon server has (ADR 0014): sign-in, the account and its
|
||||
// deletion, the pruning, the instance's basics, set up for Learn.
|
||||
HalkyonBase.configure(pod, learnBase());
|
||||
pod
|
||||
// Token managers validate and issue authentication keys; identity
|
||||
// providers are the ways people can sign in (see auth_config.dart).
|
||||
// providers are the ways people can sign in (halkyon_base's
|
||||
// auth_config.dart).
|
||||
..initializeAuthServices(
|
||||
tokenManagerBuilders: tokenManagerBuilders,
|
||||
identityProviderBuilders: identityProviderBuilders(pod),
|
||||
|
|
|
|||
Loading…
Reference in a new issue