Update oauth.py

This commit is contained in:
edicristofaro 2017-04-11 15:56:46 -04:00 committed by GitHub
parent e434159526
commit 126bfae52c
1 changed files with 6 additions and 1 deletions

View File

@ -1,3 +1,7 @@
"""
Module provides OAuth signin for Twitter, Facebook and Google. Somewhat hacked together as a learning exercise.
"""
from rauth import OAuth1Service, OAuth2Service
from flask import flash, current_app, url_for, request, redirect, session, jsonify
import json, urllib2
@ -5,6 +9,7 @@ import json, urllib2
class OAuthSignIn(object):
providers = None
# Provider Name, ID and Secret are needed here. Pull in from config.
def __init__(self, provider_name):
self.provider_name = provider_name
credentials = current_app.config['OAUTH_CREDENTIALS'][provider_name]