@@ -44,6 +44,8 @@ struct MyProgramContext {
44
44
JNIEnv* my_jni_env = nullptr ;
45
45
jobject my_activity = nullptr ;
46
46
#endif // defined(__ANDROID__)
47
+ const char * apple_id_token = nullptr ;
48
+ const char * raw_nonce = nullptr ;
47
49
const char * email = nullptr ;
48
50
const char * password = nullptr ;
49
51
const char * google_id_token = nullptr ;
@@ -74,6 +76,14 @@ firebase::auth::Auth* AuthFromApp(firebase::App* app) {
74
76
}
75
77
76
78
void VariousCredentials (firebase::auth::Auth* auth) {
79
+ {
80
+ // [START auth_credential_apple]
81
+ firebase::auth::Credential credential =
82
+ firebase::auth::OAuthProvider::GetCredential (
83
+ " apple.com" , apple_id_token, raw_nonce, nullptr );
84
+ // [END auth_credential_apple]
85
+ (void )credential;
86
+ }
77
87
{
78
88
// [START auth_credential_email]
79
89
firebase::auth::Credential credential =
@@ -113,6 +123,16 @@ void VariousSignIns(firebase::auth::Auth* auth) {
113
123
// [END auth_create_user]
114
124
(void )result;
115
125
}
126
+ {
127
+ // [START auth_sign_in_apple]
128
+ firebase::auth::Credential credential =
129
+ firebase::auth::OAuthProvider::GetCredential (
130
+ " apple.com" , apple_id_token, raw_nonce, nullptr );
131
+ firebase::Future<firebase::auth::User*> result =
132
+ auth->SignInWithCredential (credential);
133
+ // [END auth_sign_in_apple]
134
+ (void )result;
135
+ }
116
136
{
117
137
// [START auth_sign_in_email]
118
138
firebase::Future<firebase::auth::User*> result =
0 commit comments