Compare commits
2 Commits
556b8cbe50
...
e45632630a
Author | SHA1 | Date | |
---|---|---|---|
![]() |
e45632630a | ||
![]() |
1a7307b89f |
@@ -82,7 +82,7 @@ def login_callback():
|
||||
return f"Could not get profile information: {profile['reason']}"
|
||||
|
||||
if db.google_check_sso_uuid(profile['profile']['sub'])['error'] is True:
|
||||
return 'Account is unavailable for login'
|
||||
return f"Account is unavailable for login {profile['profile']['sub']}"
|
||||
|
||||
db.google_update_profile(profile['profile'])
|
||||
db.google_update_lastlogin(profile['profile']['sub'])
|
||||
@@ -104,7 +104,7 @@ def dashboard():
|
||||
va = request.form.get('value')
|
||||
rq = request.form.get('request')
|
||||
|
||||
if rq != "Add" and rq != "Delete" and rq != "Update" and rq != "Query JWT":
|
||||
if rq != "Add" and rq != "Delete" and rq != "Update" and rq != "Query JWT" and rq != "Add SUB":
|
||||
return 'Invalid request, did you use the dashboard?'
|
||||
|
||||
if rq == 'Add' or rq == 'Update':
|
||||
@@ -127,6 +127,9 @@ def dashboard():
|
||||
jwt = db.google_get_jwt(session['username'])
|
||||
flash(jwt)
|
||||
|
||||
elif rq == "Add SUB":
|
||||
db.google_add_new_sub(va)
|
||||
|
||||
uuid = session['username']
|
||||
profile = db.google_get_profile(uuid)
|
||||
lastlogin = db.google_get_lastlogin(uuid)
|
||||
|
@@ -53,6 +53,16 @@ th {
|
||||
{% endif %}
|
||||
{% endwith %}
|
||||
</tr>
|
||||
<form method="POST">
|
||||
<tr>
|
||||
<td>
|
||||
<input type="submit" value="Add SUB" name="request" >
|
||||
</td>
|
||||
<td>
|
||||
<input placeholder="Google UUID" name="value">
|
||||
</td>
|
||||
</tr>
|
||||
</form>
|
||||
</table>
|
||||
<hr>
|
||||
<h4>DNS Records school.test</h4>
|
||||
|
@@ -9,7 +9,7 @@ class GoogleOID:
|
||||
|
||||
self.settings = {'client_id': '954325872153-1v466clrtgg6h4ptt2ne5pgpb9mhilr5.apps.googleusercontent.com',
|
||||
'client_secret': client_secret,
|
||||
'callback_uri': 'http://127.0.0.1.nip.io:5000/login/gcp/callback',
|
||||
'callback_uri': 'http://dns.mashallah.nl:5000/login/gcp/callback',
|
||||
'key_server': 'https://www.googleapis.com/oauth2/v3/certs'}
|
||||
|
||||
def settings(self):
|
||||
|
Reference in New Issue
Block a user