@@ -25,7 +25,7 @@ @implementation FirestackAuth
2525 if (!user) {
2626 NSDictionary *evt = @{
2727 @" eventName" : AUTH_ANONYMOUS_ERROR_EVENT,
28- @" msg " : [error localizedDescription ]
28+ @" errorMessage " : [error localizedDescription ]
2929 };
3030
3131
@@ -41,7 +41,7 @@ @implementation FirestackAuth
4141 } @catch (NSException *ex) {
4242 NSDictionary *eventError = @{
4343 @" eventName" : AUTH_ANONYMOUS_ERROR_EVENT,
44- @" msg " : ex.reason
44+ @" errorMessage " : ex.reason
4545 };
4646
4747 [self sendJSEvent: AUTH_ERROR_EVENT
@@ -144,14 +144,15 @@ @implementation FirestackAuth
144144 sendJSEvent: AUTH_CHANGED_EVENT
145145 props: @{
146146 @" eventName" : @" userTokenError" ,
147- @" msg" : [error localizedFailureReason ]
147+ @" authenticated" : @((BOOL )true ),
148+ @" errorMessage" : [error localizedFailureReason ]
148149 }];
149150 } else {
150151 [self
151152 sendJSEvent: AUTH_CHANGED_EVENT
152153 props: @{
153154 @" eventName" : @" user" ,
154- @" authenticated" : @(true ),
155+ @" authenticated" : @(( BOOL ) true ),
155156 @" user" : userProps
156157 }];
157158 }
@@ -164,7 +165,7 @@ @implementation FirestackAuth
164165 [self sendJSEvent: AUTH_CHANGED_EVENT
165166 props: @{
166167 @" eventName" : @" no_user" ,
167- @" authenticated" : @(false ),
168+ @" authenticated" : @(( BOOL ) false ),
168169 @" error" : err
169170 }];
170171 }
@@ -185,7 +186,8 @@ @implementation FirestackAuth
185186 FIRUser *user = [FIRAuth auth ].currentUser ;
186187
187188 if (user != nil ) {
188- NSDictionary *userProps = [self userPropsFromFIRUser: user];
189+ NSMutableDictionary *userProps = [self userPropsFromFIRUser: user];
190+ [userProps setValue: @((BOOL )true ) forKey: @" authenticated" ];
189191 callback (@[[NSNull null ], userProps]);
190192 } else {
191193 // No user is signed in.
0 commit comments