Skip to content

Commit ff6d39d

Browse files
author
Stewart Miles
committed
Integrate Latest @ 286448036
CL: 286448036
1 parent 50fb1f2 commit ff6d39d

File tree

10 files changed

+47
-22
lines changed

10 files changed

+47
-22
lines changed

admob/testapp/Podfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,5 @@ source 'https://github.com/CocoaPods/Specs.git'
22
platform :ios, '8.0'
33
# AdMob test application.
44
target 'testapp' do
5-
pod 'Firebase/AdMob', '6.9.0'
5+
pod 'Firebase/AdMob', '6.14.0'
66
end

analytics/testapp/Podfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,5 @@ source 'https://github.com/CocoaPods/Specs.git'
22
platform :ios, '8.0'
33
# Analytics test application.
44
target 'testapp' do
5-
pod 'Firebase/Analytics', '6.9.0'
5+
pod 'Firebase/Analytics', '6.14.0'
66
end

auth/testapp/Podfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,5 @@ source 'https://github.com/CocoaPods/Specs.git'
22
platform :ios, '8.0'
33
# Auth test application.
44
target 'testapp' do
5-
pod 'Firebase/Auth', '6.9.0'
5+
pod 'Firebase/Auth', '6.14.0'
66
end

auth/testapp/src/common_main.cc

Lines changed: 35 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,7 @@ static const char kCustomEmail[] = "[email protected]";
6060
static const char kCustomPassword[] = "CustomPasswordGoesHere";
6161

6262
// Constants used during tests.
63+
static const char kTestNonceBad[] = "testBadNonce";
6364
static const char kTestPassword[] = "testEmailPassword123";
6465
static const char kTestEmailBad[] = "[email protected]";
6566
static const char kTestPasswordBad[] = "badTestPassword";
@@ -882,7 +883,7 @@ extern "C" int common_main(int argc, const char* argv[]) {
882883
WaitForSignInFuture(
883884
facebook_bad,
884885
"Auth::SignInWithCredential() bad Facebook credentials",
885-
kAuthErrorInvalidProviderId, auth);
886+
kAuthErrorInvalidCredential, auth);
886887
}
887888

888889
// Use bad GitHub credentials. Should fail.
@@ -893,7 +894,7 @@ extern "C" int common_main(int argc, const char* argv[]) {
893894
auth->SignInWithCredential(git_hub_cred_bad);
894895
WaitForSignInFuture(
895896
git_hub_bad, "Auth::SignInWithCredential() bad GitHub credentials",
896-
kAuthErrorInvalidProviderId, auth);
897+
kAuthErrorInvalidCredential, auth);
897898
}
898899

899900
// Use bad Google credentials. Should fail.
@@ -969,7 +970,6 @@ extern "C" int common_main(int argc, const char* argv[]) {
969970
}
970971
}
971972
#endif // TARGET_OS_IPHONE
972-
973973
// Use bad Twitter credentials. Should fail.
974974
{
975975
Credential twitter_cred_bad = TwitterAuthProvider::GetCredential(
@@ -978,7 +978,21 @@ extern "C" int common_main(int argc, const char* argv[]) {
978978
auth->SignInWithCredential(twitter_cred_bad);
979979
WaitForSignInFuture(
980980
twitter_bad, "Auth::SignInWithCredential() bad Twitter credentials",
981-
kAuthErrorInvalidProviderId, auth);
981+
kAuthErrorInvalidCredential, auth);
982+
}
983+
984+
// Construct OAuthCredential with nonce & access token.
985+
{
986+
Credential nonce_credential_good =
987+
OAuthProvider::GetCredential(kTestIdProviderIdBad, kTestIdTokenBad,
988+
kTestNonceBad, kTestAccessTokenBad);
989+
}
990+
991+
// Construct OAuthCredential with nonce, null access token.
992+
{
993+
Credential nonce_credential_good = OAuthProvider::GetCredential(
994+
kTestIdProviderIdBad, kTestIdTokenBad, kTestNonceBad,
995+
/*access_token=*/nullptr);
982996
}
983997

984998
// Use bad OAuth credentials. Should fail.
@@ -988,7 +1002,18 @@ extern "C" int common_main(int argc, const char* argv[]) {
9881002
Future<User*> oauth_bad = auth->SignInWithCredential(oauth_cred_bad);
9891003
WaitForSignInFuture(
9901004
oauth_bad, "Auth::SignInWithCredential() bad OAuth credentials",
991-
kAuthErrorInvalidProviderId, auth);
1005+
kAuthErrorFailure, auth);
1006+
}
1007+
1008+
// Use bad OAuth credentials with nonce. Should fail.
1009+
{
1010+
Credential oauth_cred_bad =
1011+
OAuthProvider::GetCredential(kTestIdProviderIdBad, kTestIdTokenBad,
1012+
kTestNonceBad, kTestAccessTokenBad);
1013+
Future<User*> oauth_bad = auth->SignInWithCredential(oauth_cred_bad);
1014+
WaitForSignInFuture(
1015+
oauth_bad, "Auth::SignInWithCredential() bad OAuth credentials",
1016+
kAuthErrorFailure, auth);
9921017
}
9931018

9941019
// Test Auth::SendPasswordResetEmail().
@@ -1077,7 +1102,7 @@ extern "C" int common_main(int argc, const char* argv[]) {
10771102
anonymous_user->LinkWithCredential(twitter_cred_bad);
10781103
WaitForFuture(link_bad_future,
10791104
"User::LinkWithCredential() with bad credential",
1080-
kAuthErrorInvalidProviderId);
1105+
kAuthErrorInvalidCredential);
10811106
ExpectTrue("Linking maintains user",
10821107
auth->current_user() == pre_link_user);
10831108
}
@@ -1094,7 +1119,7 @@ extern "C" int common_main(int argc, const char* argv[]) {
10941119
auth->SignInWithCredential(twitter_cred_bad);
10951120
WaitForFuture(signin_bad_future,
10961121
"Auth::SignInWithCredential() with bad credential",
1097-
kAuthErrorInvalidProviderId, auth);
1122+
kAuthErrorInvalidCredential, auth);
10981123
ExpectTrue("Failed sign in maintains user",
10991124
auth->current_user() == pre_signin_user);
11001125
}
@@ -1270,7 +1295,7 @@ extern "C" int common_main(int argc, const char* argv[]) {
12701295
LogMessage("Setting up provider data");
12711296
firebase::auth::FederatedOAuthProviderData provider_data;
12721297
provider_data.provider_id =
1273-
firebase::auth::GoogleAuthProvider::GetProviderId();
1298+
firebase::auth::GoogleAuthProvider::kProviderId;
12741299
provider_data.provider_id = "google.com";
12751300
provider_data.scopes = {
12761301
"https://www.googleapis.com/auth/fitness.activity.read"};
@@ -1299,7 +1324,7 @@ extern "C" int common_main(int argc, const char* argv[]) {
12991324
// --- SignInWithProvider ---
13001325
firebase::auth::FederatedOAuthProviderData provider_data;
13011326
provider_data.provider_id =
1302-
firebase::auth::GoogleAuthProvider::GetProviderId();
1327+
firebase::auth::GoogleAuthProvider::kProviderId;
13031328
provider_data.custom_parameters = {{"req_id", "1234"}};
13041329

13051330
firebase::auth::FederatedOAuthProvider provider;
@@ -1321,7 +1346,7 @@ extern "C" int common_main(int argc, const char* argv[]) {
13211346
} else {
13221347
firebase::auth::FederatedOAuthProviderData provider_data;
13231348
provider_data.provider_id =
1324-
firebase::auth::GoogleAuthProvider::GetProviderId();
1349+
firebase::auth::GoogleAuthProvider::kProviderId;
13251350
provider_data.custom_parameters = {{"req_id", "1234"}};
13261351

13271352
firebase::auth::FederatedOAuthProvider provider;

database/testapp/Podfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,6 @@ source 'https://github.com/CocoaPods/Specs.git'
22
platform :ios, '8.0'
33
# Firebase Realtime Database test application.
44
target 'testapp' do
5-
pod 'Firebase/Database', '6.9.0'
6-
pod 'Firebase/Auth', '6.9.0'
5+
pod 'Firebase/Database', '6.14.0'
6+
pod 'Firebase/Auth', '6.14.0'
77
end

dynamic_links/testapp/Podfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,5 @@ source 'https://github.com/CocoaPods/Specs.git'
22
platform :ios, '8.0'
33
# Dynamic Links test application.
44
target 'testapp' do
5-
pod 'Firebase/DynamicLinks', '6.9.0'
5+
pod 'Firebase/DynamicLinks', '6.14.0'
66
end

functions/testapp/Podfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,6 @@ source 'https://github.com/CocoaPods/Specs.git'
22
platform :ios, '8.0'
33
# Cloud Functions for Firebase test application.
44
target 'testapp' do
5-
pod 'Firebase/Functions', '6.9.0'
6-
pod 'Firebase/Auth', '6.9.0'
5+
pod 'Firebase/Functions', '6.14.0'
6+
pod 'Firebase/Auth', '6.14.0'
77
end

messaging/testapp/Podfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,5 @@ source 'https://github.com/CocoaPods/Specs.git'
22
platform :ios, '8.0'
33
# FCM test application.
44
target 'testapp' do
5-
pod 'Firebase/Messaging', '6.9.0'
5+
pod 'Firebase/Messaging', '6.14.0'
66
end

remote_config/testapp/Podfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,5 @@ source 'https://github.com/CocoaPods/Specs.git'
22
platform :ios, '8.0'
33
# Firebase Remote Config test application.
44
target 'testapp' do
5-
pod 'Firebase/RemoteConfig', '6.9.0'
5+
pod 'Firebase/RemoteConfig', '6.14.0'
66
end

storage/testapp/Podfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,6 @@ source 'https://github.com/CocoaPods/Specs.git'
22
platform :ios, '8.0'
33
# Cloud Storage for Firebase test application.
44
target 'testapp' do
5-
pod 'Firebase/Storage', '6.9.0'
6-
pod 'Firebase/Auth', '6.9.0'
5+
pod 'Firebase/Storage', '6.14.0'
6+
pod 'Firebase/Auth', '6.14.0'
77
end

0 commit comments

Comments
 (0)