Skip to content

Commit

Permalink
rename to useWebAuthn
Browse files Browse the repository at this point in the history
  • Loading branch information
atinux committed Sep 25, 2024
1 parent 38b74cc commit 0b43a42
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -451,12 +451,12 @@ export default defineWebAuthnAuthenticateEventHandler({
On the frontend it is as simple as:
```vue
<script setup lang="ts">
const { register, authenticate } = useWebauthn({
const { register, authenticate } = useWebAuthn({
registerEndpoint: '/api/webauthn/register', // Default
authenticateEndpoint: '/api/webauthn/authenticate', // Default
})
// Similar to the above as we are using the default endpoints
const { register, authenticate } = useWebauthn()
const { register, authenticate } = useWebAuthn()
const { fetch: fetchUserSession } = useUserSession()
const userName = ref('')
Expand Down
2 changes: 1 addition & 1 deletion playground/components/WebauthnModal.vue
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ const displayName = ref('')
const toast = useToast()
const { user, fetch } = useUserSession()
const { register, authenticate, isSupported } = useWebauthn()
const { register, authenticate, isSupported } = useWebAuthn()
async function signUp() {
if (logging.value || !userName.value) return
Expand Down
2 changes: 1 addition & 1 deletion src/runtime/app/composables/webauthn.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ interface AuthenticationInitResponse {
attemptId: string
}

export function useWebauthn(options: {
export function useWebAuthn(options: {
/**
* The endpoint to register a new credential.
* @default '/api/webauthn/register'
Expand Down

0 comments on commit 0b43a42

Please sign in to comment.