File tree Expand file tree Collapse file tree 8 files changed +24
-6
lines changed Expand file tree Collapse file tree 8 files changed +24
-6
lines changed Original file line number Diff line number Diff line change
1
+ ## 0.3.0-dev.2
2
+
3
+ - Clear browser cookies on ` signOut `
4
+
1
5
## 0.3.0-dev.1
2
6
3
7
- Initial version.
Original file line number Diff line number Diff line change @@ -20,5 +20,5 @@ abstract interface class Auth {
20
20
Stream <AuthState > get authStateChanges;
21
21
22
22
/// Signs out the current user, if any.
23
- void signOut ();
23
+ Future < void > signOut ();
24
24
}
Original file line number Diff line number Diff line change @@ -82,10 +82,14 @@ final class AuthImpl implements Auth {
82
82
}
83
83
84
84
@override
85
- void signOut () {
85
+ Future < void > signOut () async {
86
86
localStorage.delete ('userId' );
87
87
secureStorage.delete ('cork' );
88
- _authStateController.add (const Unauthenticated ());
88
+ try {
89
+ await protocol.signOut ();
90
+ } finally {
91
+ _authStateController.add (const Unauthenticated ());
92
+ }
89
93
}
90
94
91
95
final CelestBase celest;
Original file line number Diff line number Diff line change 1
1
name : celest_auth
2
2
description : The Auth runtime and client library for Celest, the Flutter cloud platform.
3
- version : 0.3.0-dev.1
3
+ version : 0.3.0-dev.2
4
4
homepage : https://celest.dev
5
5
repository : https://github.com/celest-dev/celest/tree/main/packages/celest_auth
6
6
@@ -12,7 +12,7 @@ dependencies:
12
12
built_collection : ^5.1.1
13
13
built_value : ^8.9.1
14
14
cedar : ^0.1.0
15
- celest_core : ^0.3.0-dev.1
15
+ celest_core : ^0.3.0-dev.2
16
16
chunked_stream : ^1.4.2
17
17
corks_cedar : ^0.1.0
18
18
ffi : ^2.1.2
Original file line number Diff line number Diff line change
1
+ ## 0.3.0-dev.2
2
+
3
+ - Add ` signOut ` method to ` AuthProtocol ` for clearing browser cookies
4
+
1
5
## 0.3.0-dev.1
2
6
3
7
- Adds ` SecureStorage ` interface for storage of sensitive data in the platform keychain
Original file line number Diff line number Diff line change @@ -16,6 +16,11 @@ final class AuthClient with BaseProtocol implements AuthProtocol {
16
16
return User .fromJson (response);
17
17
}
18
18
19
+ @override
20
+ Future <void > signOut () async {
21
+ await postJson ('/_auth/sign-out' , {});
22
+ }
23
+
19
24
@override
20
25
late final EmailClient email = EmailClient (celest);
21
26
}
Original file line number Diff line number Diff line change @@ -5,6 +5,7 @@ abstract interface class AuthProtocol {
5
5
EmailProtocol get email;
6
6
7
7
Future <User > userInfo ();
8
+ Future <void > signOut ();
8
9
}
9
10
10
11
abstract interface class EmailProtocol {
Original file line number Diff line number Diff line change 1
1
name : celest_core
2
2
description : Celest types and utilities shared between the client and the cloud.
3
- version : 0.3.0-dev.1
3
+ version : 0.3.0-dev.2
4
4
homepage : https://celest.dev
5
5
repository : https://github.com/celest-dev/celest/tree/main/packages/celest_core
6
6
You can’t perform that action at this time.
0 commit comments