@@ -44,6 +44,8 @@ struct MyProgramContext {
4444JNIEnv* my_jni_env = nullptr ;
4545jobject my_activity = nullptr ;
4646#endif // defined(__ANDROID__)
47+ const char * apple_id_token = nullptr ;
48+ const char * raw_nonce = nullptr ;
4749const char * email = nullptr ;
4850const char * password = nullptr ;
4951const char * google_id_token = nullptr ;
@@ -74,6 +76,14 @@ firebase::auth::Auth* AuthFromApp(firebase::App* app) {
7476}
7577
7678void 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+ }
7787 {
7888 // [START auth_credential_email]
7989 firebase::auth::Credential credential =
@@ -113,6 +123,16 @@ void VariousSignIns(firebase::auth::Auth* auth) {
113123 // [END auth_create_user]
114124 (void )result;
115125 }
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+ }
116136 {
117137 // [START auth_sign_in_email]
118138 firebase::Future<firebase::auth::User*> result =
0 commit comments