Package Exports
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (remix-auth-fido2) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
Remix Auth - Fido2 (WebAuthN) Strategy
A template for creating a new Remix Auth strategy.
If you want to create a new strategy for Remix Auth, you could use this as a template for your repository.
The repo installs the latest version of Remix Auth and do the setup for you to have tests, linting and typechecking.
How to use it
- In the
package.json
changename
to your strategy name, also add a description and ideally an author, repository and homepage keys. - In
src/index.ts
change theMyStrategy
for the strategy name you want to use. - Implement the strategy flow inside the
authenticate
method. Usethis.success
andthis.failure
to correctly send finish the flow. - In
tests/index.test.ts
change the tests to use your strategy and test it. Inside the tests you have access tojest-fetch-mock
to mock any fetch you may need to do. - Once you are ready, set the secrets on Github
NPM_TOKEN
: The token for the npm registryGIT_USER_NAME
: The git username you want the bump workflow to use in the commit.GIT_USER_EMAIL
: The email you want the bump workflow to use in the commit.
Scripts
build
: Build the project for production using the TypeScript compiler (strips the types).typecheck
: Check the project for type errors, this also happens in build but it's useful to do in development.lint
: Runs ESLint against the source codebase to ensure it pass the linting rules.test
: Runs all the test using Jest.
Documentations
To facilitate creating a documentation for your strategy, you can use the following Markdown
# Strategy Name
<!-- Description -->
## Supported runtimes
| Runtime | Has Support |
| ---------- | ----------- |
| Node.js | ✅ |
| Cloudflare | ✅ |
<!-- If it doesn't support one runtime, explain here why -->
## How to use
<!-- Explain how to use the strategy, here you should tell what options it expects from the developer when instantiating the strategy -->