I have implemented Apple login in django with allauth and rest-auth. I implemented same way as Google login which worked perfectly.
views.py
class AppleLogin(SocialLoginView):
adapter_class = AppleOAuth2Adapter
urls.py
urlpatterns = [
path("auth/apple/", AppleLogin.as_view(), name="apple-login"),
]
pip versions
Django==2.2.17
django-allauth==0.43.0
django-rest-auth==0.9.3
djangorestframework==3.8.2
djangorestframework-jwt==1.11.0
When I test as below I'm getting KeyError: 'id_token'
and this is where error comes from: https://github.com/pennersr/django-allauth/blob/master/allauth/socialaccount/providers/apple/views.py#L92
I have no idea how to fix this error.
Thank you for your help !
curl -X POST 'https://.../auth/apple/' \
-d 'access_token=AUTHENTICATION_CODE'
or
curl -X POST 'https://.../auth/apple/' \
-d 'id_token=ID_TOKEN' \
-d 'access_token=AUTHENTICATION_CODE'