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:
@@ -1,3 +1,7 @@
|
|||||||
|
## 1.0.5+1
|
||||||
|
|
||||||
|
- Marked the `loginWithEmailAndPassword` method in ArcaneAuthenticationService as deprecated and updated example project
|
||||||
|
|
||||||
## 1.0.5
|
## 1.0.5
|
||||||
|
|
||||||
- Added the ability to use a generic type for the login method in ArcaneAuthenticationService
|
- Added the ability to use a generic type for the login method in ArcaneAuthenticationService
|
||||||
|
|||||||
@@ -33,17 +33,8 @@ class DebugAuthInterface implements ArcaneAuthInterface {
|
|||||||
Future<Result<void, String>> loginWithEmailAndPassword({
|
Future<Result<void, String>> loginWithEmailAndPassword({
|
||||||
required String email,
|
required String email,
|
||||||
required String password,
|
required String password,
|
||||||
}) async {
|
}) async =>
|
||||||
final bool alreadyLoggedIn = await isSignedIn;
|
throw UnimplementedError();
|
||||||
|
|
||||||
if (alreadyLoggedIn) return Result.ok(null);
|
|
||||||
|
|
||||||
Arcane.log("Logging in as $email");
|
|
||||||
|
|
||||||
_isSignedIn = true;
|
|
||||||
|
|
||||||
return Result.ok(null);
|
|
||||||
}
|
|
||||||
|
|
||||||
@override
|
@override
|
||||||
Future<Result<void, String>> login<T>({
|
Future<Result<void, String>> login<T>({
|
||||||
@@ -54,7 +45,7 @@ class DebugAuthInterface implements ArcaneAuthInterface {
|
|||||||
|
|
||||||
if (alreadyLoggedIn) return Result.ok(null);
|
if (alreadyLoggedIn) return Result.ok(null);
|
||||||
|
|
||||||
Arcane.log("Logging: $input");
|
Arcane.log("Logging in with input: $input");
|
||||||
|
|
||||||
_isSignedIn = true;
|
_isSignedIn = true;
|
||||||
|
|
||||||
|
|||||||
@@ -116,9 +116,11 @@ class _HomeScreenState extends State<HomeScreen> {
|
|||||||
ElevatedButton(
|
ElevatedButton(
|
||||||
child: const Text("Sign in"),
|
child: const Text("Sign in"),
|
||||||
onPressed: () async {
|
onPressed: () async {
|
||||||
await Arcane.auth.loginWithEmailAndPassword(
|
await Arcane.auth.login<Map<String, String>>(
|
||||||
email: "email",
|
input: {
|
||||||
password: "password",
|
"email": "email",
|
||||||
|
"password": "password",
|
||||||
|
},
|
||||||
onLoggedIn: () async {
|
onLoggedIn: () async {
|
||||||
setState(() {});
|
setState(() {});
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -46,6 +46,7 @@ abstract class ArcaneAuthInterface {
|
|||||||
/// password: "password123",
|
/// password: "password123",
|
||||||
/// );
|
/// );
|
||||||
/// ```
|
/// ```
|
||||||
|
@Deprecated("Use `login` instead. Deprecated as of version 1.0.5")
|
||||||
Future<Result<void, String>> loginWithEmailAndPassword({
|
Future<Result<void, String>> loginWithEmailAndPassword({
|
||||||
required String email,
|
required String email,
|
||||||
required String password,
|
required String password,
|
||||||
|
|||||||
@@ -180,6 +180,7 @@ class ArcaneAuthenticationService extends ArcaneService {
|
|||||||
/// method will run after the authentication status has been updated.
|
/// method will run after the authentication status has been updated.
|
||||||
/// When logging in with email and password, the user's email address will be
|
/// When logging in with email and password, the user's email address will be
|
||||||
/// cached in `ArcaneSecureStorage`.
|
/// cached in `ArcaneSecureStorage`.
|
||||||
|
@Deprecated("Use `login` instead. Deprecated as of version 1.0.5")
|
||||||
Future<Result<void, String>> loginWithEmailAndPassword({
|
Future<Result<void, String>> loginWithEmailAndPassword({
|
||||||
required String email,
|
required String email,
|
||||||
required String password,
|
required String password,
|
||||||
|
|||||||
+1
-1
@@ -1,6 +1,6 @@
|
|||||||
name: arcane_framework
|
name: arcane_framework
|
||||||
description: "Agnostic Reusable Component Architecture for New Ecosystems: a modern framework for bootstrapping new applications"
|
description: "Agnostic Reusable Component Architecture for New Ecosystems: a modern framework for bootstrapping new applications"
|
||||||
version: 1.0.5
|
version: 1.0.5+1
|
||||||
repository: https://github.com/hanskokx/arcane_framework
|
repository: https://github.com/hanskokx/arcane_framework
|
||||||
issue_tracker: https://github.com/hanskokx/arcane_framework/issues
|
issue_tracker: https://github.com/hanskokx/arcane_framework/issues
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user