Skip to content

Commit

Permalink
remove webauth ntesti
Browse files Browse the repository at this point in the history
  • Loading branch information
Larkooo committed Aug 22, 2024
1 parent 6f900ca commit fc1b696
Showing 1 changed file with 0 additions and 30 deletions.
30 changes: 0 additions & 30 deletions src/App.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import { useState } from 'react'
import reactLogo from './assets/react.svg'
import twaLogo from './assets/tapps.png'
import viteLogo from '/vite.svg'
Expand All @@ -16,7 +15,6 @@ function App() {

const cartridgeConnector = connectors[0]

const [credentials, setCredentials] = useState<Credential | null>(null)
const biometryManager = useBiometryManager()

return (
Expand Down Expand Up @@ -53,34 +51,6 @@ function App() {
}}>
gib data
</button>
<button onClick={async () => {
const publicKeyCredentialCreationOptions = {
challenge: new Uint8Array(32), // You should generate this on your server
rp: {
name: "Beast Slayers",
id: "beast-slayers.vercel.app",
},
user: {
id: new Uint8Array(16), // You should generate a unique user ID
name: "[email protected]",
displayName: "User Name",
},
pubKeyCredParams: [{ alg: -7, type: "public-key" }],
authenticatorSelection: {
authenticatorAttachment: "platform",
},
timeout: 60000,
} as PublicKeyCredentialCreationOptions;

// Create credentials
const credentials = await navigator.credentials.create({
publicKey: publicKeyCredentialCreationOptions
})

setCredentials(credentials)
}}>
{credentials ? JSON.stringify(credentials) : 'create'}
</button>
<div className="card">
<button onClick={() => biometryManager?.openSettings()}>
Bio settings
Expand Down

0 comments on commit fc1b696

Please sign in to comment.