[ios][auth] replace deprecated methods

- FIREmailAuthProvider() -> FIREmailPasswordAuthProvider()
- getIDTokenForcingRefresh() -> getTokenForcingRefresh()
This commit is contained in:
Michael Diarmid 2017-06-13 06:21:45 +01:00 committed by GitHub
parent 0edb79243a
commit 87eb76520e
1 changed files with 12 additions and 12 deletions

View File

@ -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 {