Drupal is a registered trademark of Dries Buytaert
drupal 11.3.7 Update released for Drupal core (11.3.7)! drupal 11.2.11 Update released for Drupal core (11.2.11)! drupal 10.6.7 Update released for Drupal core (10.6.7)! drupal 10.5.9 Update released for Drupal core (10.5.9)! cms 2.1.1 Update released for Drupal core (2.1.1)! drupal 11.3.6 Update released for Drupal core (11.3.6)! drupal 10.6.6 Update released for Drupal core (10.6.6)! cms 2.1.0 Update released for Drupal core (2.1.0)! bootstrap 8.x-3.40 Minor update available for theme bootstrap (8.x-3.40). menu_link_attributes 8.x-1.7 Minor update available for module menu_link_attributes (8.x-1.7). eca 3.1.1 Minor update available for module eca (3.1.1). layout_paragraphs 2.1.3 Minor update available for module layout_paragraphs (2.1.3). ai 1.3.3 Minor update available for module ai (1.3.3). ai 1.2.14 Minor update available for module ai (1.2.14). node_revision_delete 2.0.3 Minor update available for module node_revision_delete (2.0.3). moderated_content_bulk_publish 2.0.52 Minor update available for module moderated_content_bulk_publish (2.0.52). klaro 3.0.10 Minor update available for module klaro (3.0.10). klaro 3.0.9 Minor update available for module klaro (3.0.9). layout_paragraphs 2.1.2 Minor update available for module layout_paragraphs (2.1.2). geofield_map 11.1.8 Minor update available for module geofield_map (11.1.8).

social_auth_apple

320 sites Security covered
View on drupal.org

Social Auth Apple is a Apple Sign-in authentication integration for Drupal. It is
based on the Social Auth and Social API projects

It adds to the site:

  • A new url: /user/login/apple.
  • A settings form at /admin/config/social-api/social-auth/apple.
  • A Apple logo in the Social Auth Login block.

REQUIREMENTS

This module requires the following modules:

* Social Auth (https://drupal.org/project/social_auth)
* Social API (https://drupal.org/project/social_api)

APPLE ACCOUNT / CREDENTIALS

The hardest part of the installation is to setup your credentials within the Apple Developer Account.
You can follow this guide:
https://developer.okta.com/blog/2019/06/04/what-the-heck-is-sign-in-with-apple

INSTALLATION

MAP FIRSTNAME / LASTNAME TO USERPROFILE

The name is only fetched the absolute first time the user logs in with the Apple ID. If you want to reset the Apple Sign-In, you have to login with your Apple ID on https://appleid.apple.com/ and remove your app from the allowed list. Also delete any related existing users in your Drupal database.

You can map the name implementing an EventSubscriber in a custom module.

Code example

<?php

namespace Drupal\my_module\EventSubscriber;

use Drupal\Core\StringTranslation\StringTranslationTrait;
use Drupal\social_auth\Event\SocialAuthEvents;
use Drupal\social_auth\Event\UserFieldsEvent;
use Symfony\Component\EventDispatcher\EventSubscriberInterface;

/**
 * Sets the domain context for an http request.
 */
class MyModuleSubscriber implements EventSubscriberInterface {

  use StringTranslationTrait;

  public function onSocialUserFields(UserFieldsEvent $event) {
    $social_user = $event->getSocialAuthUser();
    $fields = $event->getUserFields();

    if ($event->getPluginId() == 'social_auth_apple') {

      $parts = explode('@', $social_user->getEmail());
      $additional_data = $social_user->getAdditionalData();

      $fields['field_firstname'] = 'Apple ' . $this->t('Given name') . ' ' . $parts[0];
      if (!empty($additional_data['name']['firstName'])) {
        $fields['field_firstname'] = $additional_data['name']['firstName'];
      }

      $fields['field_name'] = 'Apple ' . $this->t('Last name') . ' ' . $parts[0];
      if (!empty($additional_data['name']['lastName'])) {
        $fields['field_name'] = $additional_data['name']['lastName'];
      }

      $event->setUserFields($fields);
    }

  }

  public static function getSubscribedEvents() {
    // This needs to fire very early in the stack, before accounts are cached.
    $events[SocialAuthEvents::USER_FIELDS][] = ['onSocialUserFields', 0];
    return $events;
  }

}

Activity

Total releases
3
First release
May 2025
Latest release
1 month ago
Release cadence
149 days
Stability
100% stable

Release Timeline

Releases

Version Type Release date
2.0.2 Stable Mar 2, 2026
1.1.1 Stable May 9, 2025
2.0.1 Stable May 9, 2025