Update README. Fix warning from PR #387

This commit is contained in:
Khanh Ngo 2018-10-26 08:43:25 +07:00
parent b32a77fce1
commit 3fea57fca1
3 changed files with 4 additions and 8 deletions

View File

@ -11,9 +11,8 @@ A PowerDNS web interface with advanced features.
- User management
- User access management based on domain
- User activity logging
- Local DB / SAML / LDAP / Active Directory user authentication
- Google oauth authentication
- Github oauth authentication
- Support Local DB / SAML / LDAP / Active Directory user authentication
- Support Google / Github / OpenID OAuth
- Support Two-factor authentication (TOTP)
- Dashboard and pdns service statistics
- DynDNS 2 protocol support

View File

@ -1,4 +1,3 @@
from ast import literal_eval
from flask import request, session, redirect, url_for
from app import app, authlib_oauth_client
@ -39,7 +38,6 @@ def github_oauth():
session['github_token'] = (token)
return redirect(url_for('.login'))
return github
@ -49,7 +47,6 @@ def google_oauth():
def fetch_google_token():
return session.get('google_token')
print("afkafna")
google = authlib_oauth_client.register(
'google',

View File

@ -313,7 +313,7 @@ def login():
surname = user_data['family_name']
email = user_data['email']
user = User.query.filter_by(username=email).first()
if user == None:
if user is None:
user = User.query.filter_by(email=email).first()
if not user:
user = User(username=email,
@ -339,7 +339,7 @@ def login():
github_email = me['email']
user = User.query.filter_by(username=github_username).first()
if user == None:
if user is None:
user = User.query.filter_by(email=github_email).first()
if not user:
user = User(username=github_username,