This package enables the use of Facebook Accountkit for Django Rest Framework
If you want to know more about Facebook Accountkit, check out the following resources
- https://auth0.com/blog/facebook-account-kit-passwordless-authentication/
- https://developers.facebook.com/docs/accountkit
## Installation & Configuration
pip install drf-accountkit
Then to add the Django Accountkit to your project add the app `drf_accountkit` to your `INSTALLED_APPS`
And add `drf_accountkit` URLconf to your `url.py` like this:
path('[YOUR_PREFIX]/', include('drf_accountkit.urls')),
Now add the following settings in your settings.py file
FACEBOOK_APP_ID = <Accountkit App ID>
ACCOUNT_KIT_APP_SECRET = <Accountkit App Secret>
ACCOUNT_KIT_VERSION = "v1.0"
## Usage
You have to configure account kit in your frontend and specify `[YOUR_PREFIX]/login_success` as the success url.
You either send to login success as POST (or GET) those info:
- `access_token`
or
- `code`, `state`, `status`
You will get as result:
- **Successful:** API status 200 or 201
- `token`
- `user_id`
- **Refusal:** API status 401
- `message`
## Costumization
You can overide methods of `LoginSuccess` API view like:
- `get_username(phone, email)` to costumize the username to be stored
- `response(user, token)` to costumize the response of endpoint
### This is project is based on
- The django implementation of accountkit at https://github.com/antiproblemist/django-accountkit
Metadata
Release files for drf-accountkit 0.2.3
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| drf-accountkit-0.2.3.tar.gz | 4.7 kB | Without provenance | Details for drf-accountkit-0.2.3.tar.gz |
Release files / drf-accountkit-0.2.3.tar.gz
| Download URL | drf-accountkit-0.2.3.tar.gz |
|---|---|
| Size | 4.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
67bd94555711acc4fdece13d0260c97e94d3bbfeee8bfeb534171259006952c2
|
|
BLAKE2b-256 checksum How to use checksums |
8abf2db61a63fb5251a107e5a91b472a35d86c02fedd70c7b76b486f26e2e434
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
Python-urllib/3.5
|
Security for drf-accountkit 0.2.3
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.