forked from federated-nexus/website
Add nonce support
This commit is contained in:
parent
0f42df4585
commit
8e90ca3cc1
1 changed files with 2 additions and 2 deletions
|
@ -8,6 +8,7 @@ import "../styles/login.css"
|
|||
>
|
||||
<form method="post" action="https://auth.federated.nexus/login">
|
||||
<input type="hidden" name="state" />
|
||||
<input type="hidden" name="nonce" />
|
||||
<input type="hidden" name="user_id" />
|
||||
<input type="hidden" name="access_token" />
|
||||
<input type="hidden" name="redirect_uri" />
|
||||
|
@ -33,7 +34,7 @@ import "../styles/login.css"
|
|||
|
||||
<script>
|
||||
const params = new URLSearchParams(window.location.search)
|
||||
for (const name of ["redirect_uri", "state"]) {
|
||||
for (const name of ["redirect_uri", "state", "nonce"]) {
|
||||
const input = document.querySelector(
|
||||
`input[name="${name}"]`
|
||||
) as HTMLInputElement
|
||||
|
@ -81,7 +82,6 @@ import "../styles/login.css"
|
|||
const token = form.querySelector(
|
||||
'input[name="access_token"]'
|
||||
) as HTMLInputElement
|
||||
|
||||
token.value = data.access_token
|
||||
|
||||
form.submit()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue