Giter Site home page Giter Site logo

bkawan / django-auth-with-social Goto Github PK

View Code? Open in Web Editor NEW
2.0 2.0 0.0 151 KB

This repository is an example of django authentication with social Provider such as facebook, github, google etc.

Python 54.53% HTML 45.47%
django django-auth-example django-authentication django-oauth django-social-auth django-facebook-auth

django-auth-with-social's Introduction

django-auth-with-social

This repository is an example of django authentication with Social Provider using django-allauth

alt_text

Currently Supported Social Provider

  • Facebook

Installation

$ git clone [email protected]:bkawan/django-auth-with-social.git
$ cd django-auth-with-social
$ pipenv install
$ python manage.py migrate
$ python manage.py createsuperuser
$ python manage.py runserver

Using https in localhost

$ python manage.py runserver_plus --cert /tmp/cert

Configuration

visit your admin pages (e.g. http://localhost:8000/admin/) and follow these steps:

  • Add a Site for your domain, matching settings.SITE_ID (django.contrib.sites app).
  • For each OAuth based provider, add a Social App (socialaccount app).
  • Fill in the site and the OAuth app credentials obtained from the provider.

Go to https://localhost:8000/admin/socialaccount/socialapp/add/

Then Fill the following

  • Provider
  • Name
  • Client Id
  • Secret Key

IF you do not know how to get client id and secret key from the different social provider follow the steps below.

Facebook

To get app_key and secret_key

alt text

  • Then Grab App ID and App Secret

django-auth-with-social's People

Contributors

bkawan avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar

django-auth-with-social's Issues

Setting up project

Hi @bkawan is there a step i'm doing wrong?

When trying to run migrations my terminal prints out the following

$ pipenv run python manage.py migrate
Traceback (most recent call last):
  File "manage.py", line 15, in <module>
    execute_from_command_line(sys.argv)
  File "C:\Users\Beast\.virtualenvs\django-auth-with-social-TCjP-8Ve\lib\site-packages\django\core\management\__init__.py", line 381, in execute_from_command_line
    utility.execute()
  File "C:\Users\Beast\.virtualenvs\django-auth-with-social-TCjP-8Ve\lib\site-packages\django\core\management\__init__.py", line 357, in execute
    django.setup()
  File "C:\Users\Beast\.virtualenvs\django-auth-with-social-TCjP-8Ve\lib\site-packages\django\__init__.py", line 24, in setup
    apps.populate(settings.INSTALLED_APPS)
  File "C:\Users\Beast\.virtualenvs\django-auth-with-social-TCjP-8Ve\lib\site-packages\django\apps\registry.py", line 89, in populate
    app_config = AppConfig.create(entry)
  File "C:\Users\Beast\.virtualenvs\django-auth-with-social-TCjP-8Ve\lib\site-packages\django\apps\config.py", line 90, in create
    module = import_module(entry)
  File "C:\Users\Beast\.virtualenvs\django-auth-with-social-TCjP-8Ve\lib\importlib\__init__.py", line 127, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "<frozen importlib._bootstrap>", line 1006, in _gcd_import
  File "<frozen importlib._bootstrap>", line 983, in _find_and_load
  File "<frozen importlib._bootstrap>", line 965, in _find_and_load_unlocked
ModuleNotFoundError: No module named 'allauth'

Thank you

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.