Created
March 15, 2024 03:22
-
-
Save MeiyappanKannappa/587e57db99f83a7a49127b20aa64cdb6 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // Simulate the server response with login options | |
| const loginOptions = { | |
| challenge: new Uint8Array(32), | |
| rpId: 'example.com' | |
| }; | |
| // Use the WebAuthn API to get a credential for login | |
| const credential = await navigator.credentials.get({ publicKey: loginOptions }); | |
| // Simulate sending the credential to the server for verification | |
| console.log('Credential:', credential); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment