-
-
Notifications
You must be signed in to change notification settings - Fork 54
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
conditional / mediation => autocomplete
- Loading branch information
Showing
17 changed files
with
173 additions
and
47 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,7 +4,9 @@ | |
<head> | ||
<meta charset="utf-8"> | ||
<meta name="viewport" content="width=device-width, initial-scale=1"> | ||
<title>Passkeys authenticators list</title> | ||
<link rel="stylesheet" href="https://unpkg.com/buefy/dist/buefy.min.css"> | ||
|
||
<style> | ||
code { | ||
text-wrap: nowrap; | ||
|
@@ -16,18 +18,18 @@ | |
vertical-align: middle; | ||
} | ||
</style> | ||
<script defer src="https://unpkg.com/[email protected]/dist/vue.min.js"></script> | ||
<script defer src="https://unpkg.com/[email protected]/dist/buefy.min.js"></script> | ||
<script defer type="module"> | ||
import { authenticatorMetadata } from './js/webauthn.min.js' | ||
console.log(authenticatorMetadata) | ||
const app = new Vue({ | ||
el: '#app', | ||
data: { | ||
authenticatorMetadata | ||
}}) | ||
</script> | ||
<script defer src="https://unpkg.com/[email protected]/dist/vue.min.js"></script> | ||
<script defer src="https://unpkg.com/[email protected]/dist/buefy.min.js"></script> | ||
<script defer type="module"> | ||
import { authenticatorMetadata } from './js/webauthn.min.js' | ||
console.log(authenticatorMetadata) | ||
|
||
const app = new Vue({ | ||
el: '#app', | ||
data: { | ||
authenticatorMetadata | ||
}}) | ||
</script> | ||
</head> | ||
|
||
<body> | ||
|
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,6 +3,7 @@ | |
<head> | ||
<meta charset="utf-8"> | ||
<meta name="viewport" content="width=device-width, initial-scale=1"> | ||
<title>Passkeys demo</title> | ||
<link rel="stylesheet" href="https://unpkg.com/buefy/dist/buefy.min.css"> | ||
<script defer src="https://unpkg.com/[email protected]/dist/vue.min.js"></script> | ||
<script defer src="https://unpkg.com/[email protected]/dist/buefy.min.js"></script> | ||
|
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,6 +3,7 @@ | |
<head> | ||
<meta charset="utf-8"> | ||
<meta name="viewport" content="width=device-width, initial-scale=1"> | ||
<title>Passkeys autocomplete / conditional mediation demo</title> | ||
<link rel="stylesheet" href="https://unpkg.com/buefy/dist/buefy.min.css"> | ||
<script defer src="https://unpkg.com/[email protected]/dist/vue.min.js"></script> | ||
<script defer src="https://unpkg.com/[email protected]/dist/buefy.min.js"></script> | ||
|
@@ -17,19 +18,26 @@ | |
<img src="/img/banner-biometric-auth.svg" style="max-width: 600px;"/> | ||
<p><b-tag>Please note: this is a demo. Nothing is stored server side, only locally.</b-tag></p> | ||
<br/> | ||
<article class="message is-warning has-text-left"> | ||
<div class="message-body"> | ||
Passkeys autocomplete, also known as "conditional mediation" triggers authentication when selecting a username from the autocomplete.<br> | ||
However, note that it does not work "smoothly" (or at all) on every browser / platform / authenticators. <br> | ||
Therefore, it is recommended to provide a fallback to trigger authentication without <code>autocomplete: true</code> too. | ||
</div> | ||
</article> | ||
|
||
<p> | ||
<code>isAutocompleteAvailable()</code> ? | ||
<b-tag type="is-success" v-if="autocompleteAvailable === true">true</b-tag> | ||
<b-tag type="is-danger" v-if="autocompleteAvailable === false">false</b-tag> | ||
</p> | ||
|
||
<br/> | ||
<b-input v-model="username" placeholder="Username" autocomplete="username webauthn"></b-input> | ||
<div class="my-3"> | ||
<b-button type="is-primary" @click="register()" :disabled="!username">Register</b-button> | ||
<b-button type="is-primary" @click="logout()" :disabled="!registrationParsed && !authenticationParsed">Sign Out</b-button> | ||
</div> | ||
<article class="message is-warning"> | ||
<div class="message-body"> | ||
Conditional UI triggers authentication when selecting a username from the autocomplete. <br> | ||
However, note that it does not work on every browser / platform / authenticators. <br> | ||
Therefore, it is recommended to provide a fallback to trigger authentication without <code>conditional: true</code> too. | ||
</div> | ||
</article> | ||
</section> | ||
|
||
<section v-if="registrationParsed" class="has-text-left"> | ||
|
@@ -41,8 +49,8 @@ | |
<p> | ||
<b>Synced?</b> | ||
<template v-if="registrationParsed.authenticator"> | ||
<b-tag type="is-primary" v-if="registrationParsed.credential.synced === true">Synced / multi-device credential</b-tag> | ||
<b-tag type="is-primary" v-if="registrationParsed.credential.synced === false">Device-bound credential</b-tag> | ||
<b-tag type="is-primary" v-if="registrationParsed.synced === true">Synced / multi-device credential</b-tag> | ||
<b-tag type="is-primary" v-if="registrationParsed.synced === false">Device-bound credential</b-tag> | ||
</template> | ||
</p> | ||
<hr/> | ||
|
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,6 +3,7 @@ | |
<head> | ||
<meta charset="utf-8"> | ||
<meta name="viewport" content="width=device-width, initial-scale=1"> | ||
<title>Passkeys debugger / verifier</title> | ||
<link rel="stylesheet" href="https://unpkg.com/[email protected]/dist/buefy.min.css"> | ||
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@mdi/[email protected]/css/materialdesignicons.min.css"> | ||
<link rel="stylesheet" href="theme.css"> | ||
|
This file contains 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
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,6 +3,7 @@ | |
<head> | ||
<meta charset="utf-8"> | ||
<meta name="viewport" content="width=device-width, initial-scale=1"> | ||
<title>Passkeys playground</title> | ||
<link rel="stylesheet" href="https://unpkg.com/[email protected]/dist/buefy.min.css"> | ||
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@mdi/[email protected]/css/materialdesignicons.min.css"> | ||
<link rel="stylesheet" href="theme.css"> | ||
|
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Oops, something went wrong.