Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

pass id_token for parsing tokens #172

Merged
merged 1 commit into from
Nov 24, 2020
Merged

pass id_token for parsing tokens #172

merged 1 commit into from
Nov 24, 2020

Conversation

yyken
Copy link
Contributor

@yyken yyken commented Nov 19, 2020

I try to implement sign in with apple, and it needs id_token to parsing.

Bellow is my sample code

from allauth.socialaccount.providers.apple.views import AppleOAuth2Adapter
from allauth.socialaccount.providers.apple.client import AppleOAuth2Client

from dj_rest_auth.registration.views import SocialLoginView

class AppleLogin(SocialLoginView):
    client_class = AppleOAuth2Client
    callback_url = 'https://localhost:8000/accounts/apple/login/callback/'

    adapter_class = AppleOAuth2Adapter

pass id_token to tokens_to_parse
@iMerica
Copy link
Owner

iMerica commented Nov 19, 2020

Hi, can you share a link to a bug report or let us know how to reproduce the issue this change attempts to fix?

@yyken
Copy link
Contributor Author

yyken commented Nov 19, 2020

Hi,
I find it throw exception when parsing tokens.
Below link shows id_token is needed, so I try to resolved it.

https://github.com/pennersr/django-allauth/blob/master/allauth/socialaccount/providers/apple/views.py#L92

@iMerica iMerica merged commit effd621 into iMerica:master Nov 24, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants