All Projects → fcornelius → django-firebase-auth

fcornelius / django-firebase-auth

Licence: BSD-3-Clause license
Django DRF authentication provider for Google's Firebase Authentication Service

Programming Languages

python
139335 projects - #7 most used programming language

Projects that are alternatives of or similar to django-firebase-auth

smart-home
Control house using raspberry pi djago based secure REST api. Made using raspberry pi, arduino, django ,django REST and angular.
Stars: ✭ 30 (-40%)
Mutual labels:  django-rest-framework, jwt-authentication
shopping-cart
A simple Shopping-cart built with React and Django REST Framework(DRF)
Stars: ✭ 41 (-18%)
Mutual labels:  django-rest-framework, jwt-authentication
drf-angular-docker-tutorial
Dockerized Django Back-end API using DRF with Angular Front-end Tutorial
Stars: ✭ 53 (+6%)
Mutual labels:  django-rest-framework, jwt-authentication
Django rest Vuejs Auth
An Authentication project using JWT Tokens, Vuejs(frontend) and Django-Rest(backend).
Stars: ✭ 92 (+84%)
Mutual labels:  django-rest-framework, jwt-authentication
drf-jwt-example
Code samples of the tutorial "How to Use JWT Authentication with Django REST Framework"
Stars: ✭ 31 (-38%)
Mutual labels:  django-rest-framework, jwt-authentication
react-nodejs-mongodb-crud
👨‍💻 Fullstack web app built with MongoDB, NodeJs, React and Redux. Features: Protected routes client/server side, MaterialUI layout
Stars: ✭ 91 (+82%)
Mutual labels:  jwt-authentication
django-rest-framework-datatables-editor
Seamless integration between Django REST framework, Datatables and Datatables Editor.
Stars: ✭ 25 (-50%)
Mutual labels:  django-rest-framework
DjangoUnboxed
Production ready django based starter kit
Stars: ✭ 67 (+34%)
Mutual labels:  django-rest-framework
react-auth-kit
Easily manage Authentication state of users in React-based Apps using Hooks and Higher-order components
Stars: ✭ 177 (+254%)
Mutual labels:  jwt-authentication
drf-turbo
An alternative serializer implementation for REST framework written in cython built for speed.
Stars: ✭ 73 (+46%)
Mutual labels:  django-rest-framework
repanier
Django extension : web tool for short circuit food supply
Stars: ✭ 18 (-64%)
Mutual labels:  django-rest-framework
phalcon-micro-rest-api-skeleton
This is a basic API REST skeleton written on Phalcon PHP. Great For building an MVP for your frontend app (Vue, react, angular, or anything that can consume an API)
Stars: ✭ 57 (+14%)
Mutual labels:  jwt-authentication
Auto-DL
Auto-DL helps you make Deep Learning models without writing a single line of code and giving as little input as possible.
Stars: ✭ 165 (+230%)
Mutual labels:  django-rest-framework
python-web-dev-21-2
Material for "Web Development in Python with Django" using Django 2.1, published as a Pearson LiveLesson on Safari Books Online
Stars: ✭ 38 (-24%)
Mutual labels:  django-rest-framework
filtermapbackend
FilterMapBackend for django-rest-framework
Stars: ✭ 16 (-68%)
Mutual labels:  django-rest-framework
drf tweaks
Extensions for Django Rest Framework
Stars: ✭ 77 (+54%)
Mutual labels:  django-rest-framework
CloudCV
☁️ CloudCV Website
Stars: ✭ 53 (+6%)
Mutual labels:  django-rest-framework
drf ujson2
JSON parser and renderer using ujson for Django Rest Framework
Stars: ✭ 29 (-42%)
Mutual labels:  django-rest-framework
django-rest-framework-example
REST framework example for Django < 1.9 // New version ->
Stars: ✭ 29 (-42%)
Mutual labels:  django-rest-framework
csf
ArmourBird CSF - Container Security Framework
Stars: ✭ 48 (-4%)
Mutual labels:  django-rest-framework

django-firebase-auth

django-firebase-auth is a authentication provider for Google's Firebase Authentication Service which blends right into django-rest-framework. Simply setup your Firebase keyfile location and mark views which need authentication with the FirebaseAuthMixin authentication class.

Detailed documentation is in the "docs" directory.

Installation

Install via pip:

pip install django-firebase-auth

(This will also install dependencies django-rest-framework and firebase-admin.)

Quick start

  1. Add "firebase_auth" to your INSTALLED_APPS setting like this:

    INSTALLED_APPS = [
        ...
        'firebase_auth',
    ]
    
  2. Specify a location for your Firebase keyfile with the settings:

    KEYFILES_DIR = os.path.join(BASE_DIR, 'keyfiles')
    FIREBASE_KEY = '<your-key-file>.json'
    

    And place the json key inside BASE_DIR/keyfiles.

  3. Either set FirebaseAuthentication as the global default authentication class in settings, like:

    REST_FRAMEWORK = {
        'DEFAULT_AUTHENTICATION_CLASSES': ('firebase_auth.authentication.FirebaseAuthentication', ),
    }
    

    Or extend specific views from FirebaseAuthMixin, like:

    from firebase_auth import FirebaseAuthMixin
    class MyModelViewSet(FirebaseAuthMixin, viewsets.ModelViewSet)
        ...
    

    Note that the auth mixin has to be the first class extended by the view.

  4. Create your users with the Firebase user ID as user ID. Inside your views, you can access the user reference like you're used to with request.user

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].