Skip to content

How to save user to db without 'request' in register_by_access_token(request, backend) function? #393

@Matusko

Description

@Matusko

I would really like to use psa as authentication system (im using django) for my single page app. I have a function exchanging authorisation_code given by client for access_token like this:

def auth(request):
code = request.POST['code']
provider = 'google-oauth2'
...
return access_token, client_id, expires_in, token_type

If i want to create and persist my user using this example http://python-social-auth.readthedocs.org/en/latest/use_cases.html#signup-by-oauth-access-token
I dont really know what the request should be.

Is there some way how to create a db record from this using psa?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions