build: setup docker containers for development
This commit is contained in:
25
app/public/javascripts/user-login.js
Normal file
25
app/public/javascripts/user-login.js
Normal file
@@ -0,0 +1,25 @@
|
||||
fetch('/users/generate-auth-options/arthur')
|
||||
.then(resp => resp.json())
|
||||
.then((optionsJSON) => {
|
||||
console.log(optionsJSON);
|
||||
return SimpleWebAuthnBrowser.startAuthentication({ optionsJSON })
|
||||
})
|
||||
.then(authResp => {
|
||||
console.log("verify");
|
||||
return fetch("/users/verify-auth", {
|
||||
method: "POST",
|
||||
headers: {
|
||||
"Content-Type": "application/json",
|
||||
},
|
||||
body: JSON.stringify({
|
||||
authResp: authResp,
|
||||
username: "arthur"
|
||||
})
|
||||
});
|
||||
})
|
||||
.then(res => {
|
||||
console.log(res);
|
||||
})
|
||||
.catch(err => {
|
||||
console.error(err);
|
||||
});
|
||||
Reference in New Issue
Block a user