0.0.8 • Published 5 years ago

webauthn-helper v0.0.8

Weekly downloads
-
License
MIT
Repository
github
Last release
5 years ago

Webauthn Helper

This package contains helper functions to handle Webauthn registration and authentication. It is primarily designed to be used with the Web-Auth Framework from Spomky-Labs.

Installation

With Yarn:

yarn add webauthn-helper

Usage

// Import the tool(s) ou need
import {useRegistration, useLogin} from 'webauthn-helper';

// We want to register new authenticators
const register = useRegistration({
    actionUrl: '/api/register',
    optionsUrl: '/api/register/options'
});

register({
    username: 'FOO4',
     displayName: 'baR'
})
    .then((response)=> console.log('Registration success'))
    .catch((error)=> console.log('Registration failure'))
;

// We want to authenticate a user
const login = useLogin({
    loginUrl: '/api/login',
    loginOptions: '/api/login/options'
});

login({
    username: 'FOO4'
})
    .then((response)=> console.log('Login success'))
    .catch((error)=> console.log('Login failure'))
;

Support

I bring solutions to your problems and answer your questions.

If you really love that project and the work I have done or if you want I prioritize your issues, then you can help me out for a couple of :beers: or more!

Become a sponsor

Or

Become a Patreon

Contributing

Requests for new features, bug fixed and all other ideas to make this framework useful are welcome. If you feel comfortable writing code, you could try to fix opened issues where help is wanted or those that are easy to fix.

Do not forget to follow these best practices.

If you think you have found a security issue, DO NOT open an issue. You MUST submit your issue here.

Licence

This software is release under MIT licence.

0.0.8

5 years ago

0.0.7

5 years ago

0.0.6

5 years ago

0.0.5

5 years ago

0.0.4

5 years ago

0.0.3

5 years ago

0.0.2

5 years ago

0.0.1

5 years ago