mirror of
https://github.com/hanskokx/arcane_framework.git
synced 2026-05-14 02:19:08 +02:00
v1.0.5+1
- Marks `loginWithEmailAndPassword` as deprecated and update example Signed-off-by: Hans Kokx <hans.d.kokx@gmail.com>
This commit is contained in:
@@ -33,17 +33,8 @@ class DebugAuthInterface implements ArcaneAuthInterface {
|
||||
Future<Result<void, String>> loginWithEmailAndPassword({
|
||||
required String email,
|
||||
required String password,
|
||||
}) async {
|
||||
final bool alreadyLoggedIn = await isSignedIn;
|
||||
|
||||
if (alreadyLoggedIn) return Result.ok(null);
|
||||
|
||||
Arcane.log("Logging in as $email");
|
||||
|
||||
_isSignedIn = true;
|
||||
|
||||
return Result.ok(null);
|
||||
}
|
||||
}) async =>
|
||||
throw UnimplementedError();
|
||||
|
||||
@override
|
||||
Future<Result<void, String>> login<T>({
|
||||
@@ -54,7 +45,7 @@ class DebugAuthInterface implements ArcaneAuthInterface {
|
||||
|
||||
if (alreadyLoggedIn) return Result.ok(null);
|
||||
|
||||
Arcane.log("Logging: $input");
|
||||
Arcane.log("Logging in with input: $input");
|
||||
|
||||
_isSignedIn = true;
|
||||
|
||||
|
||||
@@ -116,9 +116,11 @@ class _HomeScreenState extends State<HomeScreen> {
|
||||
ElevatedButton(
|
||||
child: const Text("Sign in"),
|
||||
onPressed: () async {
|
||||
await Arcane.auth.loginWithEmailAndPassword(
|
||||
email: "email",
|
||||
password: "password",
|
||||
await Arcane.auth.login<Map<String, String>>(
|
||||
input: {
|
||||
"email": "email",
|
||||
"password": "password",
|
||||
},
|
||||
onLoggedIn: () async {
|
||||
setState(() {});
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user