         data.publicKey.challenge = base64UrlDecode(data.publicKey.challenge)
            data.publicKey.allowCredentials.forEach(function (listItem) {
                listItem.id = base64UrlDecode(listItem.id)
            });

            let assertion = await navigator.credentials.get(data);

            // Send credentials back to server to save
            let res = await fetch(`/login/finish?authid=${authid}`, {
                method: 'POST',
                headers: {
                    'Content-Typ