[ios][auth] replace deprecated methods
- FIREmailAuthProvider() -> FIREmailPasswordAuthProvider() - getIDTokenForcingRefresh() -> getTokenForcingRefresh()
This commit is contained in:
parent
0edb79243a
commit
87eb76520e
|
@ -282,7 +282,7 @@ RCT_EXPORT_METHOD(getToken:(BOOL)forceRefresh resolver:(RCTPromiseResolveBlock)
|
|||
FIRUser *user = [FIRAuth auth].currentUser;
|
||||
|
||||
if (user) {
|
||||
[user getIDTokenForcingRefresh:(BOOL) forceRefresh completion:^(NSString *token, NSError *_Nullable error) {
|
||||
[user getTokenForcingRefresh:(BOOL) forceRefresh completion:^(NSString *token, NSError *_Nullable error) {
|
||||
if (error) {
|
||||
[self promiseRejectAuthException:reject error:error];
|
||||
} else {
|
||||
|
@ -472,7 +472,7 @@ RCT_EXPORT_METHOD(fetchProvidersForEmail:(NSString *)email resolver:(RCTPromiseR
|
|||
} else if ([provider compare:@"google" options:NSCaseInsensitiveSearch] == NSOrderedSame) {
|
||||
credential = [FIRGoogleAuthProvider credentialWithIDToken:authToken accessToken:authTokenSecret];
|
||||
} else if ([provider compare:@"password" options:NSCaseInsensitiveSearch] == NSOrderedSame) {
|
||||
credential = [FIREmailAuthProvider credentialWithEmail:authToken password:authTokenSecret];
|
||||
credential = [FIREmailPasswordAuthProvider credentialWithEmail:authToken password:authTokenSecret];
|
||||
} else if ([provider compare:@"github" options:NSCaseInsensitiveSearch] == NSOrderedSame) {
|
||||
credential = [FIRGitHubAuthProvider credentialWithToken:authToken];
|
||||
} else {
|
||||
|
|
Loading…
Reference in New Issue