Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/walison17/django-rest-firebase-auth
Use firebase authentication with your django rest framework project
https://github.com/walison17/django-rest-firebase-auth
authentication django django-rest-firebase django-rest-framework firebase-auth firebase-authentication python
Last synced: 3 months ago
JSON representation
Use firebase authentication with your django rest framework project
- Host: GitHub
- URL: https://github.com/walison17/django-rest-firebase-auth
- Owner: walison17
- License: mit
- Created: 2020-05-25T01:51:50.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2024-02-07T19:31:54.000Z (11 months ago)
- Last Synced: 2024-09-30T10:42:35.078Z (3 months ago)
- Topics: authentication, django, django-rest-firebase, django-rest-framework, firebase-auth, firebase-authentication, python
- Language: Python
- Homepage:
- Size: 44.9 KB
- Stars: 24
- Watchers: 4
- Forks: 8
- Open Issues: 6
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Django Rest Firebase Auth
Use firebase authentication with your django rest framework project
[![codecov](https://codecov.io/gh/walison17/django-rest-firebase-auth/branch/master/graph/badge.svg)](https://codecov.io/gh/walison17/django-rest-firebase-auth)
## Requirements
- Python >= 3.7
- Django >= 2.2
- Django Rest Framework## Installation
```
pip install django-rest-firebase-auth
```On your project's `settings.py` add this to the `REST_FRAMEWORK` configuration
```python
REST_FRAMEWORK = {
...
"DEFAULT_AUTHENTICATION_CLASSES": [
"firebase_auth.authentication.FirebaseAuthentication"
]
...
}
```Get your admin credentials `.json` from the Firebase SDK and add them to your project
```python
FIREBASE_AUTH = {
"SERVICE_ACCOUNT_KEY_FILE": "path_to_your_credentials.json"
}
```The `django-rest-firebase-auth` comes with the following settings as default, which can be overridden in your project's `settings.py`.
```python
FIREBASE_AUTH = {
"SERVICE_ACCOUNT_KEY_FILE": "",# require that user has verified their email
"EMAIL_VERIFICATION": False
}
```