Giter Club home page Giter Club logo

login_system's Introduction

Login System

A Login system made entirely with Python using Flask login, Flask Dance and Flask Mail. In this project the user is able to Sign up, Sign in with email, Reset password and Sign in with Github, Google, or Facebook.

Demo

Sign up and Login with email:

Sign up and Login email

Forgot password:

Reset password

Sign in with GitHub:

Sign in Github

Sign in with Google:

Sign in Google

Sign in with Facebook:

Sign in Facebook

Getting Started

These instructions will get you a copy of the project up and running on your local machine for development and testing purposes.

Installing

Clone this repository: https://github.com/vanessamcf/login_system.git

Go into the repository: cd login_system

Install environment:

 python3 -m pip install --user --upgrade pip
 python3 -m pip install --user virtualenv
 python3 -m venv env

Enable virtual environment: source env/bin/activate

Install packages: pip install -r requirements.txt

Create db:

 python3
 from project import db, create_app
 db.create_all(app=create_app())
 exit()

Create your project inside Github/Google and Facebook Developer:

1- Settings -> Developer settings -> OAuth Apps -> New OAuth App

2- Include Application name of your preference

3- Include Homepage URL: http://127.0.0.1:5000/

4- Include Authorization callback URL: http://localhost:5000/login/github/authorized

5- Register application

6- Copy your Client ID and Client Secret

7- Inside the Project go to social_login.py line 12

8- Paste the Client ID where is 'YOUR CLIENT ID'

9- Paste the Client Secret where is 'YOUR CLIENT SECRET'

1- Settings -> New Project

2- Include Project name of your preference

3- APIs & Services -> OAuth consent screen

4- Select External and Create

5- Include App name of your preference

6- Select your User support email

7- Developer contact information: Include your email then Save and Continue

8- If you want you can skip: Scopes and Test users tapping Save and Continue

9- After filled OAuth consens screen, go to Credentials

10- Create Credentials -> OAuth client ID

11- Select application type Web application

12- Update Name of the application

13- Authorized JavaScript origins -> ADD URI: http://127.0.0.1:5000

14- Authorized redirect URIs -> ADD URI: http://localhost:5000/login/google/authorized

15- Create

15- Copy your Client ID and Client Secret

16- Inside the Project go to social_login.py line 14

17- Paste the Client ID where is 'YOUR CLIENT ID'

18- Paste the Client Secret where is 'YOUR CLIENT SECRET'

1- My Apps -> Create App -> Something Else -> Continue

2- Include your App Display Name -> Create App

3- Settings -> Basic

4- Include App Domains: localhost

5- Add Platform (at the bottom) -> Website

6- Include Site URL: http://localhost:5000/login/facebook/authorized

7- Save Changes

8- Copy your Client ID and Client Secret

9- Inside the Project go to social_login.py line 21

10- Paste the Client ID where is 'YOUR CLIENT ID'

11- Paste the Client Secret where is 'YOUR CLIENT SECRET'

Forgot password functionality (configure Google account):

1 - Go into your Google account -> Manage your Google Account -> Security -> Less secure app access -> Turn on access -> Allow less secure app

2- After Allow less secure app to have access, go to the __init__.py

3- Update the lines 22 and 23 with your email and password where is [email protected] and password

   app.config['MAIL_USERNAME'] = '[email protected]'
   app.config['MAIL_PASSWORD'] = 'password'

4- Save the file and go to auth.py

5- Update the line 37 with your email where is [email protected]

  msg.sender = '[email protected]'

Run the application:

  • Terminal: flask run

License

This project is licensed under the MIT License - see the LICENSE.md file for details

Acknowledgments

login_system's People

Contributors

vanessamcf avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

login_system's Issues

Typo in README

Wow, what a wonderful resource. I just noticed a typo in the README:
python3
from project import db, create_app
db.creaye_all(app=create_app()) * should be db.create_all(app=create_app())
exit()

Thanks for your hard work making this template, it's helping me a lot

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.