AppleID¶
Apple ID implemented OAuth2 and OpenID Connect protocols for their authentication mechanism. To
enable python-social-auth
support follow this steps:
Go to Apple Developer Portal and
Create a Services ID, activate «Sign In with Apple» and grant your «return URLs»
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
Enable the backend:
SOCIAL_AUTH_AUTHENTICATION_BACKENDS = ( ... 'social_core.backends.apple.AppleIdAuth', ... )
Further documentation at Website Developer Guide and Getting Started.