IndieAuth tweaks

This commit is contained in:
Thomas Sileo 2019-04-28 11:10:01 +02:00
parent 512f5dda33
commit d104290675
2 changed files with 4 additions and 4 deletions

4
app.py
View file

@ -2212,7 +2212,7 @@ def indieauth_endpoint():
session["logged_in"] = True session["logged_in"] = True
me = auth["me"] me = auth["me"]
state = auth["state"] state = auth["state"]
scope = " ".join(auth["scope"]) scope = auth["scope"].split()
print("STATE", state) print("STATE", state)
return build_auth_resp({"me": me, "state": state, "scope": scope}) return build_auth_resp({"me": me, "state": state, "scope": scope})
@ -2235,7 +2235,7 @@ def token_endpoint():
) )
if not auth: if not auth:
abort(403) abort(403)
scope = " ".join(auth["scope"]) scope = auth["scope"].split()
payload = dict( payload = dict(
me=me, client_id=client_id, scope=scope, ts=datetime.now().timestamp() me=me, client_id=client_id, scope=scope, ts=datetime.now().timestamp()
) )

View file

@ -14,8 +14,8 @@
{% endif %} {% endif %}
<div style="flex:1;"> <div style="flex:1;">
<div style="margin-top:20px"> <div style="margin-top:20px">
<a style="font-size:1.2em;font-weight:600;text-decoration:none;color:#111;" href="{{ client.url }}">{{ client.name }}</a> <a class="lcolor" style="font-size:1.2em;font-weight:600;text-decoration:none;" href="{{ client.url }}">{{ client.name }}</a>
<p>wants you to login</p> <p>wants you to login as <strong class="lcolor">{{ me }}</strong></p>
</div> </div>
</div> </div>
</div> </div>