diff --git a/README.md b/README.md index e761485..983ad1d 100644 --- a/README.md +++ b/README.md @@ -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 diff --git a/app/oauth.py b/app/oauth.py index a578341..e42bbfb 100644 --- a/app/oauth.py +++ b/app/oauth.py @@ -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', diff --git a/app/views.py b/app/views.py index 1d51559..83a62ab 100644 --- a/app/views.py +++ b/app/views.py @@ -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,