Coder Social home page Coder Social logo

django-rest-auth's Introduction

Django REST Framework User Authentication

Overview

This Django project provides user authentication functionalities using popular packages such as django-allauth, dj-rest-auth, and djangorestframework. It includes features for login, registration, password reset, password change, email verification, and social media logins (Google, Facebook, GitHub).

Features

Login & Registration:

  • Users can register for an account and log in securely.

Password Management:

  • Password reset functionality allows users to recover their account.
  • Users can change their password for enhanced security.

Email Verification:

  • Verify user email addresses to ensure account authenticity.

Social Media Logins:

  • Google Login: Users can sign in using their Google accounts.
  • Facebook Login: Users can log in using their Facebook credentials.
  • GitHub Login: Integration with GitHub for secure authentication.

Getting Started

Running the Django REST Framework User Authentication Project


Prerequisites

Before running the project, ensure that you have the following prerequisites installed on your system:

  • Python (version 3.11.x)
  • pip (Python package installer)

Setup

  1. Clone the project repository:

    git clone https://github.com/Aneemes/django-rest-auth.git
    
  2. Navigate to the project directory:

    cd django-rest-auth
    
  3. Create a virtual environment (optional but recommended):

    python -m venv venv
    

    Activate the virtual environment:

    • On Windows:

      venv\Scripts\activate
      
    • On macOS/Linux:

      source venv/bin/activate
      
  4. Install project dependencies:

    pip install -r requirements.txt
    

.env Configuration

  1. Create a .env file in the project's root directory.

  2. Use the provided .env.example template and fill in the necessary values.

Database Setup

  1. Run migrations to apply database changes:

    python manage.py makemigrations
    python manage.py migrate
    

Note: the project used the default sqlite database since its just a demo.

Run the Project

  1. Start the Django development server:

    python manage.py runserver
    
  2. Open your web browser and go to http://localhost:8000 to access the project.

Usage

Now that the project is running, you can explore the user authentication features using django-allauth, dj-rest-auth, and djangorestframework. Here are some key URLs:

Explore and test the authentication features as needed.

Shutting Down

To stop the Django development server, press Ctrl + C in the terminal where it is running. Additionally, deactivate the virtual environment if you used one:

deactivate

TODO:

  • Use JWT instead of default token
  • Make a frontend

django-rest-auth's People

Contributors

aneemes avatar

Watchers

 avatar

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.