diff --git a/app.py b/app.py index 2620393..2c2a94f 100644 --- a/app.py +++ b/app.py @@ -25,6 +25,7 @@ app.secret_key = config.get("auth","FN_FLASK_SECRET_KEY") app.register_blueprint(google_auth.app) app.register_blueprint(callback_sms.app) app.register_blueprint(app_settings.app) +app.register_blueprint(app_auth.app) loginMsg = "You are not logged in." diff --git a/app_auth.py b/app_auth.py index cd19500..e880e16 100644 --- a/app_auth.py +++ b/app_auth.py @@ -8,6 +8,8 @@ config.read('config.ini') app_debug = config.get("app","debug") app_salt = config.get("auth","FN_FLASK_SECRET_KEY") +app = flask.Blueprint('app_auth', __name__) + def is_logged_in(): if google_auth.is_logged_in(): return True diff --git a/app_settings.py b/app_settings.py index 75a2904..414de3f 100644 --- a/app_settings.py +++ b/app_settings.py @@ -7,7 +7,7 @@ import pprint import configparser import flask -import appdb +import appdb, app_auth import google_auth config = configparser.ConfigParser() @@ -22,7 +22,7 @@ else: @app.route('/settings') def appsettings(): - if not google_auth.is_logged_in(): + if not app_auth.is_logged_in(): return flask.render_template('deny.html', denymsg = "I don't know who you are so I can't help you with your user settings. :(", loggedin = False) user_info = google_auth.get_user_info() refreshtoken = google_auth.getRefreshToken() diff --git a/templates/settings.html b/templates/settings.html index 5b701f6..e72959d 100644 --- a/templates/settings.html +++ b/templates/settings.html @@ -2,8 +2,10 @@ {{ account_info.1 }}'s Settings {% include 'include/navblock.html' %} @@ -12,6 +14,7 @@
User ID: {{ account_info.0 }}
+
User Name: {{ account_info['username'] }}
Name:
Email: {{ account_info.2 }}
Account created on {{ account_info.6 }}
@@ -22,7 +25,8 @@

Local Password

Password:
Confirm:
-
+
+
Your active DIDs: (Click number to access messaging)