st4lk / django-rest-social-auth

OAuth signin with django rest framework
MIT License
519 stars 122 forks source link

Exchange provider access token for JWT #157

Open pbeneteau opened 2 years ago

pbeneteau commented 2 years ago

I'm trying to setup a view that will accept a provider access token (and NOT the code) to get a JWT for my API. But I don't know if I need to subclass the BaseSocialAuthView or if there is any other simple way.

In some cases, for example using the native iOS Apple sign in SDK, Apple directly sends the access token and not the oauth code. So there is no need for the intermediary request to get the access token from the oauth code.

Is there a way to exchange the access token for a JWT using this library?