Fyle OAuth2 provider for Django, lets you associate Fyle accounts with your User accounts.
Project description
fyle-django-allauth
Fyle OAuth 2.0 provider for django-allauth, lets you associate Fyle accounts with your User accounts.
Dependencies
Install django-allauth and configure it.
Quick start
-
Install fyle-django-allauth
pip install fyle-django-allauth
-
Include 'fyle_allauth' in the INSTALLED_APPS section of settings.py :
INSTALLED_APPS = ( ... 'django.contrib.sites', 'allauth', 'allauth.account', 'allauth.socialaccount', 'fyle_allauth' # new
-
Fyle App registration (get your client_id and client_secret here)
- Login to Fyle
- Goto settings and click on Developers
- Click on create new app, enter the details and select type as OAuth 2.0
- For Redirect URI enter
- 'http://localhost:8000/accounts/fyle/login/callback/' for development
- 'https://your_domain/accounts/fyle/login/callback/' for production
- Note down the client_secret and client_id
-
Open django-admin and create a new record under Social Applications Select Fyle as provider and enter the above noted client_secret and client_id.
Final step is to add our site to the Chosen sites on the bottom.
-
Visit http://localhost:8000/accounts/fyle/login to login using your Fyle account.
-
If using a custom user model then add the below lines to settings.py
# For custom user model that has email as the user identifying field ACCOUNT_USER_MODEL_USERNAME_FIELD = None ACCOUNT_USERNAME_REQUIRED = False ACCOUNT_EMAIL_REQUIRED = True ACCOUNT_AUTHENTICATION_METHOD = 'email' # Disable verification mail [optional] ACCOUNT_EMAIL_VERIFICATION = 'none'
-
If you are using a different application then update your base URL by adding the below line to settings.py
FYLE_BASE_URL = 'https://app.fyle.in'
For more info on customisation refer the django-allauth documentation
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for fyle-django-allauth-0.1.1.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 659db99a13025ddefee738d56c681127dd4d10a631a1d4aaa84ec4d437bad356 |
|
MD5 | e4b264ded032520867b6a2639bea9d34 |
|
BLAKE2b-256 | da7dfbf881ffa75144c1e34645449dc8cd665c4667509de34aef4ab981b92668 |
Hashes for fyle_django_allauth-0.1.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 571e5d23e0f274b58ae45cb8190033c7ff48a8511f758bd4015669edf1372f17 |
|
MD5 | 01ebf1c8fb235d41d9a10bbabcfd8c25 |
|
BLAKE2b-256 | 6193eff533265e34d3b808c821cea47961b08a579c8a9589ffa05f562fff0a1b |