-
-
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.
- Loading branch information
Showing
11 changed files
with
248 additions
and
196 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,7 +2,7 @@ Passwordless.ID / webauthn | |
========================== | ||
|
||
A greatly simplified and opinionated wrapper to invoke the [webauthn protocol](https://w3c.github.io/webauthn/) more conveniently. | ||
It is an [open source](https://github.com/passwordless-id/webauthn), minimalistic (11kb) and dependency-free library. | ||
It is an [open source](https://github.com/passwordless-id/webauthn), dependency-free and minimalistic library (17kb only, from which 11kb is the list of authenticator aaguids/names). | ||
|
||
<img src="demos/img/banner-biometric-auth.svg" /> | ||
|
||
|
@@ -17,8 +17,9 @@ Other demos with minial examples: | |
- [Basic Demo](https://webauthn.passwordless.id/demos/basic.html) | ||
- [Minimal Example (CDN)](https://webauthn.passwordless.id/demos/example-cdn.html) | ||
- [Minimal Example (repository)](https://webauthn.passwordless.id/demos/example-raw.html) | ||
- [Authenticators list](https://webauthn.passwordless.id/demos/authenticators.html) | ||
|
||
GitHub: https://github.com/passwordless-id/webauthn | ||
The source of all demos is on [GitHub](https://github.com/passwordless-id/webauthn) | ||
|
||
|
||
How does the protocol work? | ||
|
@@ -49,7 +50,7 @@ import * as webauthn from '@passwordless-id/webauthn' | |
|
||
```html | ||
<script type="module"> | ||
import { client } from 'https://unpkg.com/@passwordless-id/[email protected].1/dist/webauthn.min.js' | ||
import { client } from 'https://unpkg.com/@passwordless-id/[email protected].2/dist/webauthn.min.js' | ||
</script> | ||
``` | ||
### Import | ||
|
@@ -67,7 +68,7 @@ So you might for example `import { client } from '@passwordless-id/webauthn'` fo | |
|
||
### Runs in... | ||
|
||
- In Chrome, Edge, Safari (*Firefox is still missing a [piece](https://github.com/passwordless-id/webauthn/issues/18)*) | ||
- In Chrome, Edge, Firefox, Safari | ||
- NodeJS **19+** (*) | ||
- Cloudflare Workers | ||
- Probably in most recent browsers/servers | ||
|
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 |
---|---|---|
@@ -0,0 +1,65 @@ | ||
<!DOCTYPE html> | ||
<html> | ||
|
||
<head> | ||
<meta charset="utf-8"> | ||
<meta name="viewport" content="width=device-width, initial-scale=1"> | ||
<link rel="stylesheet" href="https://unpkg.com/buefy/dist/buefy.min.css"> | ||
<style> | ||
main.container { | ||
text-align: center; | ||
} | ||
.authenticators { | ||
table-layout: fixed; | ||
width: 100%; | ||
} | ||
.authenticators th { | ||
text-align: center; | ||
} | ||
.authenticators img { | ||
width: 32px; | ||
height: 32px; | ||
} | ||
</style> | ||
</head> | ||
|
||
<body> | ||
<main id="app" class="section container"> | ||
<h1 class="title">Authenticators list</h1> | ||
<p>Includes both hardware and software authenticators.</p> | ||
|
||
<table class="authenticators table is-striped is-narrow is-hoverable"> | ||
<thead> | ||
<th>AAGUID</th> | ||
<th>Name</th> | ||
</thead> | ||
<tbody> | ||
<tr v-for="(name, aaguid) in authenticatorMetadata"> | ||
<td> | ||
{{aaguid}} | ||
</td> | ||
<td> | ||
{{name}} | ||
</td> | ||
</tr> | ||
</tbody> | ||
</table> | ||
</main> | ||
|
||
<script src="https://unpkg.com/[email protected]/dist/vue.min.js"></script> | ||
<script src="https://unpkg.com/[email protected]/dist/buefy.min.js"></script> | ||
<script src="https://unpkg.com/browse/[email protected]/dist/axios.min.js"></script> | ||
|
||
<script type="module"> | ||
import { authenticatorMetadata } from '../../dist/webauthn.min.js' | ||
console.log(authenticatorMetadata) | ||
|
||
const app = new Vue({ | ||
el: '#app', | ||
data: { | ||
authenticatorMetadata | ||
}}) | ||
</script> | ||
</body> | ||
|
||
</html> |
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 |
---|---|---|
|
@@ -10,7 +10,7 @@ | |
|
||
|
||
<script type="module"> | ||
import { client } from 'https://unpkg.com/@passwordless-id/[email protected].1/dist/webauthn.min.js' | ||
import { client } from 'https://unpkg.com/@passwordless-id/[email protected].2/dist/webauthn.min.js' | ||
|
||
window.register = async function() { | ||
console.log('Registering...') | ||
|
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
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
Oops, something went wrong.