mirror of
https://git.sr.ht/~tsileo/microblog.pub
synced 2024-11-15 03:04:28 +00:00
IndieAuth tweaks
This commit is contained in:
parent
512f5dda33
commit
d104290675
2 changed files with 4 additions and 4 deletions
4
app.py
4
app.py
|
@ -2212,7 +2212,7 @@ def indieauth_endpoint():
|
|||
session["logged_in"] = True
|
||||
me = auth["me"]
|
||||
state = auth["state"]
|
||||
scope = " ".join(auth["scope"])
|
||||
scope = auth["scope"].split()
|
||||
print("STATE", state)
|
||||
return build_auth_resp({"me": me, "state": state, "scope": scope})
|
||||
|
||||
|
@ -2235,7 +2235,7 @@ def token_endpoint():
|
|||
)
|
||||
if not auth:
|
||||
abort(403)
|
||||
scope = " ".join(auth["scope"])
|
||||
scope = auth["scope"].split()
|
||||
payload = dict(
|
||||
me=me, client_id=client_id, scope=scope, ts=datetime.now().timestamp()
|
||||
)
|
||||
|
|
|
@ -14,8 +14,8 @@
|
|||
{% endif %}
|
||||
<div style="flex:1;">
|
||||
<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>
|
||||
<p>wants you to login</p>
|
||||
<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 as <strong class="lcolor">{{ me }}</strong></p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
Loading…
Reference in a new issue