Open-source Flask Sample built on top of flask-dance library

Overview

Flask Social Login (Twitter & Github)

Open-source Flask Sample built on top of flask-dance library. The project implements the social login for Github and Twitter - Originally coded by TestDriven.IO.


✨ Features:

  • Up-to-date dependencies
  • OPENID Social login over Flask Dance
    • Github
    • Twitter
  • SQLite Persistence, SQLAlchemy ORM
  • Free Support: email and Discord (1k+ community).

Flask Social Login - Free sample provided by AppSeed.


✨ Build from sources

πŸ‘‰ Step #1 - Clone sources (this repo)

$ # Clone the sources
$ git clone https://github.com/app-generator/flask-social-login-v2.git
$ cd flask-social-login-v2

πŸ‘‰ Step #2 - Create a virtual environment

$ # Virtualenv modules installation (Unix based systems)
$ virtualenv env
$ source env/bin/activate
$
$ # Virtualenv modules installation (Windows based systems)
$ # virtualenv env
$ # .\env\Scripts\activate

πŸ‘‰ Step #3 - Install dependencies

$ pip3 install -r requirements.txt

πŸ‘‰ Step #4 - Set Up Environment

$ # Set the FLASK_APP environment variable
$ (Unix/Mac) export FLASK_APP=run.py
$ (Windows) set FLASK_APP=run.py
$ (Powershell) $env:FLASK_APP = ".\run.py"

πŸ‘‰ Step #5 - (optional) Enable DEBUG Environment (local development)

$ # Set up the DEBUG environment
$ (Unix/Mac) export FLASK_ENV=development
$ (Windows) set FLASK_ENV=development
$ (Powershell) $env:FLASK_ENV = "development"

πŸ‘‰ Github Setup - Create an OAuth App

  • SignIN to Github
  • Access Settings -> Developer Settings -> OAuth Apps
  • Edit your OAuth App
    • App Name
    • App Description
    • (mandatory) HomePage: https://localhost:5000
    • (mandatory) Authorization callback URL: https://localhost:5000/login/github/authorized
    • Generate a new secret key

πŸ‘‰ Twitter Setup - Create an OAuth App

  • SignIN to Twitter
  • Access Developer Section -> https://developer.twitter.com/en/portal/projects-and-apps
  • Create a new APP
  • Edit User authentication settings
    • Check OAuth 1.0a
    • (mandatory) HomePage: https://localhost:5000
    • (mandatory) Authorization callback URL: https://localhost:5000/login/twitter/authorized

πŸ‘‰ Update Environment - Rename .env.sample to .env and edit the file

  • For GITHUB Login
    • GITHUB_ID - value provided by Github Setup
    • GITHUB_SECRET - value provided by Github Setup
  • For TWitter Login
    • TWITTER_ID - value provided by Twitter Setup
    • TWITTER_SECRET - value provided by Twitter Setup

πŸ‘‰ Start the project Using HTTPS

$ flask run --cert=adhoc
$
$ # Access the app: HTTPS://127.0.0.1:5000/

Important: The --cert=adhoc will force the https protocol


✨ Account Details

Once the user is authenticated, all available information can be accessed via /ping route:

Github sample (truncated): https://localhost:5000/ping

{
  "avatar_url": "https://avatars.githubusercontent.com/u/51070104?v=4", 
  "bio": "App Generator and Boilerplate Code.", 
  "blog": "https://appseed.us/app-generator", 
  "company": "AppSeed", 
  "created_at": "2019-05-27T04:55:15Z", 
  "followers": 777, 
  "public_repos": 495, 
  "url": "https://api.github.com/users/app-generator"
}

✨ Sample SShots

Successfull Github Login

Successfull Github Login


Successfull TWitter Login

Successfull Twitter Login


Github account information

Github account info - JSON format.


✨ Credits



Flask Social Login (Twitter & Github) - Free sample provided by AppSeed App Generator.

You might also like...
A simple web application built using python flask. It can be used to scan SMEVai accounts for broken pages.

smescan A simple web application built using python flask. It can be used to scan SMEVai accounts for broken pages. Development Process Step 0: Clone

Flask-Bcrypt is a Flask extension that provides bcrypt hashing utilities for your application.

Flask-Bcrypt Flask-Bcrypt is a Flask extension that provides bcrypt hashing utilities for your application. Due to the recent increased prevelance of

Flask-Rebar combines flask, marshmallow, and swagger for robust REST services.

Flask-Rebar Flask-Rebar combines flask, marshmallow, and swagger for robust REST services. Features Request and Response Validation - Flask-Rebar reli

Flask-Bcrypt is a Flask extension that provides bcrypt hashing utilities for your application.

Flask-Bcrypt Flask-Bcrypt is a Flask extension that provides bcrypt hashing utilities for your application. Due to the recent increased prevelance of

Flask-Starter is a boilerplate starter template designed to help you quickstart your Flask web application development.
Flask-Starter is a boilerplate starter template designed to help you quickstart your Flask web application development.

Flask-Starter Flask-Starter is a boilerplate starter template designed to help you quickstart your Flask web application development. It has all the r

Brandnew-flask is a CLI tool used to generate a powerful and mordern flask-app that supports the production environment.

Brandnew-flask is still in the initial stage and needs to be updated and improved continuously. Everyone is welcome to maintain and improve this CLI.

Flask Project Template A full feature Flask project template.

Flask Project Template A full feature Flask project template. See also Python-Project-Template for a lean, low dependency Python app. HOW TO USE THIS

A Fast API style support for Flask. Gives you MyPy types with the flexibility of flask
A Fast API style support for Flask. Gives you MyPy types with the flexibility of flask

Flask-Fastx Flask-Fastx is a Fast API style support for Flask. It Gives you MyPy types with the flexibility of flask. Compatibility Flask-Fastx requir

Flask-app scaffold, generate flask restful backend

Flask-app scaffold, generate flask restful backend

Releases(v0.0.1)
WebSocket support for Flask

flask-sock WebSocket support for Flask Installation pip install flask-sock Example from flask import Flask, render_template from flask_sock import Soc

Miguel Grinberg 165 Dec 27, 2022
A live chat built with python(flask + gevent + apscheduler) + redis

a live chat room built with python(flask / gevent / apscheduler) + redis Basic Architecture Screenshot Install cd /path/to/source python bootstrap.py

Limboy 309 Nov 13, 2022
Connect is a Python Flask project within the cloud-native ecosystem

Connect is a Python Flask project within the cloud-native ecosystem. Second project of Udacity's Cloud Native Nanodegree program, focusing on documenting and architecting a monolith migration to micr

Lauren Ferreira 3 Feb 28, 2022
A flask extension using pyexcel to read, manipulate and write data in different excel formats: csv, ods, xls, xlsx and xlsm.

Flask-Excel - Let you focus on data, instead of file formats Support the project If your company has embedded pyexcel and its components into a revenu

247 Dec 27, 2022
A clean and simple blog system based on Flask and MongoDB

CleanBlog A clean and simple blog system based on Flask and MongoDB You can access CleanBlog This is the source code of Flask Tutorial Pro,you can buy

shin 107 Oct 06, 2022
A flask app that turn image into ASCII art

ASCII art A flask app that turn image into ASCII art. This app has been deployed to https://motmaytinh.herokuapp.com Getting Started These instruction

Trần Ngọc Quý 1 Jan 13, 2022
This repo contains the Flask API to expose model and get predictions.

Tea Leaf Quality Srilanka Chapter This repo contains the Flask API to expose model and get predictions. Expose Model As An API Model Trainig will happ

DuKe786 2 Nov 12, 2021
a flask profiler which watches endpoint calls and tries to make some analysis.

Flask-profiler version: 1.8 Flask-profiler measures endpoints defined in your flask application; and provides you fine-grained report through a web in

Mustafa Atik 718 Dec 20, 2022
A simple barcode and QR code generator built in Python with Flask.

✨ Komi - Barcode & QR Generator ✨ A simple barcode and QR code generator built in Python with Flask. πŸ“‘ Table of Contents Usage Installation Contribut

Bonnie Fave 2 Nov 04, 2021
A Flask web application that manages student entries in a SQL database

Student Database App This is a Flask web application that manages student entries in a SQL database. Users can upload a CSV into the SQL database, mak

rebecca 1 Oct 20, 2021
Open-source Flask Sample built on top of flask-dance library

Open-source Flask Sample built on top of flask-dance library. The project implements the social login for Github and Twitter - Originally coded by TestDriven.IO.

App Generator 4 Jul 26, 2022
Heroku Flask Setup

Heroku Flask Setup

Abhimanyu Haralukallu 0 Dec 07, 2021
Python Flask API service, backed by DynamoDB, running on AWS Lambda using the traditional Serverless Framework.

Serverless Framework Python Flask API service backed by DynamoDB on AWS Python Flask API service, backed by DynamoDB, running on AWS Lambda using the

Andreu JovΓ© 0 Apr 17, 2022
Companion code to my O'Reilly book "Flask Web Development", second edition.

Flasky This repository contains the source code examples for the second edition of my O'Reilly book Flask Web Development. The commits and tags in thi

Miguel Grinberg 8k Dec 27, 2022
Map Matching & Weight Completion service - Java (Springboot) & Python(Flask)

Map Matching service to match coordinates to roads using Java and Springboot. Weight Completion service to fill in missing weights in a graph, using Python and Flask.

2 May 13, 2022
Intranet de la Rez Flask web app

IntraRez Application Flask de l'Intranet de la Rez. Exigences Python : Probablement = 3.10 Γ  terme, pour l'instant = 3.8 suffit ; Autres packages Li

3 Jul 03, 2022
Telegram bot + Flask API ( Make Introduction pages )

Introduction-Page-Maker Setup the api Upload the flask api on your host Setup requirements Make pages file on your host and upload the css and js and

Plugin 9 Feb 11, 2022
Flask Sitemapper is a small Python 3 package that generates XML sitemaps for Flask applications.

Flask Sitemapper Flask Sitemapper is a small Python 3 package that generates XML sitemaps for Flask applications. This allows you to create a nice and

6 Jan 06, 2023
Small flask based opds catalog designed to serve a directory via OPDS

teenyopds Small flask based opds catalog designed to serve a directory via OPDS, it has currently only been verified to work with KyBook 3 on iOS but

Adam Furbee 4 Jul 14, 2022
Flask starter template for better structuring.

Flask Starter app Flask starter template for better structuring. use the starter plate step 1 : cloning this repo through git clone the repo git clone

Tirtharaj Sinha 1 Jul 26, 2022