• en
  • Language: ru
  • Documentation version: 0.1

AppleID

Apple ID implemented OAuth2 and OpenID Connect protocols for their authentication mechanism. To enable python-social-auth support follow this steps:

  1. Go to Apple Developer Portal and

  1. Create or select an existing App ID

  2. Create a Sign Certificate

  3. Create a Services ID, activate «Sign In with Apple» and grant your «return URLs»

  1. Fill App Id and Secret in your project settings:

    SOCIAL_AUTH_APPLE_ID_CLIENT = '...'             # Your client_id com.application.your, aka "Service ID"
    SOCIAL_AUTH_APPLE_ID_TEAM = '...'               # Your Team ID, ie K2232113
    SOCIAL_AUTH_APPLE_ID_KEY = '...'                # Your Key ID, ie Y2P99J3N81K
    SOCIAL_AUTH_APPLE_ID_SECRET = """
    -----BEGIN PRIVATE KEY-----
    MIGTAgE.....
    -----END PRIVATE KEY-----"""
    SOCIAL_AUTH_APPLE_ID_SCOPE = ['email', 'name']
    SOCIAL_AUTH_APPLE_ID_EMAIL_AS_USERNAME = True   # If you want to use email as username
    
  2. Enable the backend:

    SOCIAL_AUTH_AUTHENTICATION_BACKENDS = (
        ...
        'social_core.backends.apple.AppleIdAuth',
        ...
    )
    

Further documentation at Website Developer Guide and Getting Started.