aboutsummaryrefslogtreecommitdiffhomepage
path: root/Example/Auth/Sample
diff options
context:
space:
mode:
authorGravatar Zsika Phillip <protocol86@users.noreply.github.com>2018-04-25 21:50:19 -0700
committerGravatar GitHub <noreply@github.com>2018-04-25 21:50:19 -0700
commitbd85f550931f89c82ebf77d53cbff049bfef9be8 (patch)
tree77ac278f2221fd1b7413bdc84d2c246669f82ae8 /Example/Auth/Sample
parent0748f265a6c95e2692f27ad59235521cb45e175d (diff)
Adds new callback to createUse API (breaking change) (#1186)
Diffstat (limited to 'Example/Auth/Sample')
-rw-r--r--Example/Auth/Sample/MainViewController.m8
1 files changed, 5 insertions, 3 deletions
diff --git a/Example/Auth/Sample/MainViewController.m b/Example/Auth/Sample/MainViewController.m
index 4c9ec13..0da28c8 100644
--- a/Example/Auth/Sample/MainViewController.m
+++ b/Example/Auth/Sample/MainViewController.m
@@ -1884,7 +1884,8 @@ static NSDictionary<NSString *, NSString *> *parseURL(NSString *urlString) {
callback:(nullable FIRAuthResultCallback)callback {
[[AppManager auth] createUserWithEmail:email
password:password
- completion:^(FIRUser *_Nullable user, NSError *_Nullable error) {
+ completion:^(FIRAuthDataResult *_Nullable result,
+ NSError *_Nullable error) {
if (error) {
[self logFailure:@"sign-up with Email/Password failed" error:error];
if (callback) {
@@ -1893,7 +1894,7 @@ static NSDictionary<NSString *, NSString *> *parseURL(NSString *urlString) {
} else {
[self logSuccess:@"sign-up with Email/Password succeeded."];
if (callback) {
- callback(user, nil);
+ callback(result.user, nil);
}
}
[self showTypicalUIForUserUpdateResultsWithTitle:@"Sign-In" error:error];
@@ -2803,7 +2804,8 @@ static NSDictionary<NSString *, NSString *> *parseURL(NSString *urlString) {
[self showSpinner:^{
[[AppManager auth] createUserWithEmail:email
password:password
- completion:^(FIRUser *_Nullable user, NSError *_Nullable error) {
+ completion:^(FIRAuthDataResult *_Nullable result,
+ NSError *_Nullable error) {
if (error) {
[self logFailure:@"create user failed" error:error];
} else {