Skip to content

Jeb4dev/flutter-django-oauth2

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Django Flutter OAuth2 login demo

Flutter + Django REST Framework + OAuth2.0 (Resource Owner Password Credentials Grant) + SQLite3

This is a demo project to show how to implement OAuth2.0 authentication in a Flutter app using Django REST Framework as the backend. This project uses Resource Owner Password Credentials Grant flow.

Demo

django-flutter-oauth2.mp4

sorry for the bad quality / aspect ratio

How to run

Set up the Django backend:

Install dependencies

pip install -r requirements.txt

Migrate

python manage.py migrate

Create superuser

python manage.py createsuperuser

Run server

python manage.py runserver

Add oauth provider application

http://127.0.0.1:8000/admin/oauth2_provider/application/add/

  • Client type: Confidential
  • Authorization grant type: Resource owner password-based

Copy the client id and client secret to the flutter/lib/oauth2_login.dart file.

Now you should be ready to go!

Credits

This project is heavily based on:

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors