Skip to content

PSA: Using the demo token #102

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

Closed
1beb opened this issue Feb 8, 2022 · 0 comments
Closed

PSA: Using the demo token #102

1beb opened this issue Feb 8, 2022 · 0 comments

Comments

@1beb
Copy link

1beb commented Feb 8, 2022

A comment to passerby attempting to use the demo token. The format is { pk: 'XXXXX' } so if you were trying to auth user 1 with code 111111, it would be:

'PASSWORDLESS_DEMO_USERS': { 1: '111111' }

It's also important to note that you must first create a token by sending the typical POST to auth/email. Then you can use the demo token to get an auth token back.

curl -X POST -d "email=emailaddress" https://domain/auth/email
# {"detail":"A login token has been sent to your email."}

# Then!
curl -X POST -d "email=emailaddress&token=111111" https://domain/auth/token/

Note: You may wish to use a version of drfpasswordless that includes the fix here: #88

@1beb 1beb closed this as completed Jan 12, 2023
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

No branches or pull requests

1 participant