Updating game data to mid season patch and made card gallery nicer
This commit is contained in:
@@ -68,15 +68,15 @@ function serializeAssertion(credential) {
|
||||
}
|
||||
|
||||
window.passkeyEnroll = async function () {
|
||||
const optRes = await fetch('/api/auth/register/options', { method: 'POST' });
|
||||
const optRes = await fetch('/api/auth/register/options', {method: 'POST'});
|
||||
if (!optRes.ok) throw new Error(await optRes.text());
|
||||
const options = prepareCreationOptions(await optRes.json());
|
||||
|
||||
const credential = await navigator.credentials.create({ publicKey: options });
|
||||
const credential = await navigator.credentials.create({publicKey: options});
|
||||
|
||||
const completeRes = await fetch('/api/auth/register/complete', {
|
||||
method: 'POST',
|
||||
headers: { 'Content-Type': 'application/json' },
|
||||
headers: {'Content-Type': 'application/json'},
|
||||
body: JSON.stringify(serializeAttestation(credential)),
|
||||
});
|
||||
if (!completeRes.ok) throw new Error(await completeRes.text());
|
||||
@@ -84,15 +84,15 @@ window.passkeyEnroll = async function () {
|
||||
};
|
||||
|
||||
window.passkeyLogin = async function () {
|
||||
const optRes = await fetch('/api/auth/login/options', { method: 'POST' });
|
||||
const optRes = await fetch('/api/auth/login/options', {method: 'POST'});
|
||||
if (!optRes.ok) throw new Error(await optRes.text());
|
||||
const options = prepareRequestOptions(await optRes.json());
|
||||
|
||||
const credential = await navigator.credentials.get({ publicKey: options });
|
||||
const credential = await navigator.credentials.get({publicKey: options});
|
||||
|
||||
const completeRes = await fetch('/api/auth/login/complete', {
|
||||
method: 'POST',
|
||||
headers: { 'Content-Type': 'application/json' },
|
||||
headers: {'Content-Type': 'application/json'},
|
||||
body: JSON.stringify(serializeAssertion(credential)),
|
||||
});
|
||||
if (!completeRes.ok) throw new Error(await completeRes.text());
|
||||
|
||||
Reference in New Issue
Block a user