Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error: DOMException: The request is not allowed by the user agent or the platform in the current context, possibly because the user denied permission #53

Closed
mytricker0 opened this issue May 25, 2024 · 2 comments

Comments

@mytricker0
Copy link

I get Error: DOMException: The request is not allowed by the user agent or the platform in the current context, possibly because the user denied permission When trying to do this:

const response = await fetch(${apiUrl}/api/challenge?${params.toString()}, {
method: 'GET',
headers: {
'Content-Type': 'application/json',
},
});

if (!response.ok) {
throw new Error('Network response was not ok');
}

const challenge = await response.text();
console.log('Challenge:', challenge);
try {
const registration = await client.register(${formData.firstName} ${formData.lastName}, challenge, {
authenticatorType: "auto",
userVerification: "required",
timeout: 60000,
attestation: true,
userHandle: "",
debug: false
})
console.log('Registration:', registration);

these are the logs:
Result: 99b5c557-51d3-4945-a9b5-999889cc6b77 [index.tsx:139:10](webpack:https://_N_E/pages/add/index.tsx?2ab1)

Error: DOMException: The request is not allowed by the user agent or the platform in the current context, possibly because the user denied permission.

@dagnelies
Copy link
Collaborator

Dunno. Too vague.

@dagnelies
Copy link
Collaborator

I closed it seems it seemed more like a problem with your code than this library. Feel free to reopen it if you have more information.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants