File tree Expand file tree Collapse file tree 3 files changed +6
-6
lines changed
platform_browser/persistence Expand file tree Collapse file tree 3 files changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -65,6 +65,7 @@ describe('core/user/user_impl', () => {
65
65
stsTokenManager,
66
66
displayName : 'displayName' ,
67
67
email : 'email' ,
68
+ emailVerified : true ,
68
69
phoneNumber : 'phoneNumber' ,
69
70
photoURL : 'photoURL'
70
71
} ) ;
@@ -73,6 +74,7 @@ describe('core/user/user_impl', () => {
73
74
expect ( user . email ) . to . eq ( 'email' ) ;
74
75
expect ( user . phoneNumber ) . to . eq ( 'phoneNumber' ) ;
75
76
expect ( user . photoURL ) . to . eq ( 'photoURL' ) ;
77
+ expect ( user . emailVerified ) . to . be . true ;
76
78
} ) ;
77
79
78
80
it ( 'sets optional fields to null if not provided' , ( ) => {
@@ -81,6 +83,7 @@ describe('core/user/user_impl', () => {
81
83
expect ( user . email ) . to . eq ( null ) ;
82
84
expect ( user . phoneNumber ) . to . eq ( null ) ;
83
85
expect ( user . photoURL ) . to . eq ( null ) ;
86
+ expect ( user . emailVerified ) . to . be . false ;
84
87
} ) ;
85
88
} ) ;
86
89
Original file line number Diff line number Diff line change @@ -83,6 +83,7 @@ export class UserImpl implements UserInternal {
83
83
this . accessToken = stsTokenManager . accessToken ;
84
84
this . displayName = opt . displayName || null ;
85
85
this . email = opt . email || null ;
86
+ this . emailVerified = opt . emailVerified || false ;
86
87
this . phoneNumber = opt . phoneNumber || null ;
87
88
this . photoURL = opt . photoURL || null ;
88
89
this . isAnonymous = opt . isAnonymous || false ;
Original file line number Diff line number Diff line change @@ -52,13 +52,9 @@ class BrowserLocalPersistence
52
52
53
53
constructor ( ) {
54
54
super ( window . localStorage , PersistenceType . LOCAL ) ;
55
- this . boundEventHandler = this . onStorageEvent . bind ( this ) ;
56
55
}
57
56
58
- private readonly boundEventHandler : (
59
- event : StorageEvent ,
60
- poll ?: boolean
61
- ) => void ;
57
+ private readonly boundEventHandler = ( event : StorageEvent , poll ?: boolean ) : void => this . onStorageEvent ( event , poll ) ;
62
58
private readonly listeners : Record < string , Set < StorageEventListener > > = { } ;
63
59
private readonly localCache : Record < string , string | null > = { } ;
64
60
// setTimeout return value is platform specific
@@ -88,7 +84,7 @@ class BrowserLocalPersistence
88
84
}
89
85
}
90
86
91
- private onStorageEvent ( event : StorageEvent , poll : boolean = false ) : void {
87
+ private onStorageEvent ( event : StorageEvent , poll = false ) : void {
92
88
// Key would be null in some situations, like when localStorage is cleared
93
89
if ( ! event . key ) {
94
90
this . forAllChangedKeys (
You can’t perform that action at this time.
0 commit comments