Skip to content

Commit

Permalink
Tidied some more stuff.
Browse files Browse the repository at this point in the history
  • Loading branch information
twrecked committed Oct 13, 2022
1 parent da5a4a9 commit 533a1ab
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 13 deletions.
10 changes: 5 additions & 5 deletions google-app-engine/google-auth/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ def oauth2_callback():
response = urllib.request.urlopen(refresh_url, params).read()
response = json.loads(response)

return flask.render_template("authenticate-finish.html", token=response["refresh_token"])
return flask.render_template("success.html", token=response["refresh_token"])


@app.route('/refresh')
Expand All @@ -108,13 +108,13 @@ def refresh():

@app.route('/test')
def test():

tests = {"access_token": "ya29.a0Aa4xrXMoxmlVCSWwKDSUdNcsXNZjTmHR-UARfXpNpG-FBSEReXiURNnhe1tUV4wYbc9mGOctTtB8PJSptURScdqEgWRmDLcAGMVKt5FW25aTOWKyV_IeH7ajb5ojGPcVypeT3c7PF5HWZMJCAdAxYt9VkdMSaCgYKATASARESFQEjDvL9_87oPJ7An0Y2_U_r6ekA6w0163",
print("here")
tests = {"access_token": "teesting",
"expires_in": 3599,
"refresh_token": "1//0d8h5W5ZDA2eOCgYIARAAGA0SNwF-L9Ir5sSf5pF9xxJv2qI-qfD2Myg_00A1v3Fa577rE3Ki5Q3PLFpqF5nHJCi7e_v7bhKQUBE",
"refresh_token": "testing",
"scope": "https://mail.google.com/",
"token_type": "Bearer"}
return flask.render_template("authenticate-finish.html", token=tests['refresh_token'])
return flask.render_template("success.html", token=tests['refresh_token'])


if __name__ == '__main__':
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,8 @@
<body>
<div style="margin-left: 5%; margin-right: 5%;">
<h2>Pyaarlo Google Authentication</h2>

Success! Now add the following to your current <tt>Arlo</tt> configuration.

<pre>
aarlo:
imap_ouath_type: gmail
imap_ouath_token: {{token}}
</pre>
{% block content %}
{% endblock %}
</div>
</body>

Expand Down
12 changes: 12 additions & 0 deletions google-app-engine/google-auth/templates/success.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{% extends "layout.html" %}
{% block content %}

Success! Now add the following to your current <tt>Arlo</tt> configuration.

<pre>
aarlo:
imap_ouath_type: gmail
imap_ouath_token: {{token}}
</pre>

{% endblock %}

0 comments on commit 533a1ab

Please sign in to comment.