Skip to content

Commit

Permalink
Update installation instructions
Browse files Browse the repository at this point in the history
  • Loading branch information
MasterKale committed Nov 24, 2024
1 parent 2a6a9c3 commit bd5bc51
Show file tree
Hide file tree
Showing 4 changed files with 56 additions and 60 deletions.
33 changes: 11 additions & 22 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,18 +1,20 @@
# SimpleWebAuthn Project <!-- omit in toc -->
# SimpleWebAuthn <!-- omit in toc -->

![WebAuthn](https://img.shields.io/badge/WebAuthn-Simplified-blueviolet?style=for-the-badge&logo=WebAuthn)
[![npm (scoped)](https://img.shields.io/npm/v/@simplewebauthn/server?style=for-the-badge&logo=npm)](https://www.npmjs.com/search?q=simplewebauthn)
[![JSR Scope](https://jsr.io/badges/@simplewebauthn?style=for-the-badge)](https://jsr.io/@simplewebauthn)

- [Overview](#overview)
- [Installation](#installation)
- [Documentation](#documentation)
- [Sponsors](#sponsors)
- [Example](#example)
- [Contributions](#contributions)
- [Development](#development)

## Overview

This monorepo contains two complimentary libraries to help reduce the amount of work needed to
This project features two complimentary libraries to help reduce the amount of work needed to
incorporate WebAuthn into a website. The following packages are maintained here:

- [@simplewebauthn/server](https://github.com/MasterKale/SimpleWebAuthn/tree/master/packages/server)
Expand All @@ -22,31 +24,18 @@ An additional package is also included that contains shared TypeScript definitio

- [@simplewebauthn/types](https://github.com/MasterKale/SimpleWebAuthn/tree/master/packages/types/)

See these packages' READMEs for more specific implementation information.

**API Documentation**

In-depth documentation for all of the packages in this project is available here:
https://simplewebauthn.dev/docs/

## Installation

These packages are all available on **npm** for use in **Node LTS 20.x** projects and supports
**both CommonJS and [ECMAScript modules (ESM)](https://nodejs.org/api/esm.html#enabling)**:
SimpleWebAuthn is available on **[NPM](https://www.npmjs.com/search?q=%40simplewebauthn)**,
**[JSR](https://jsr.io/@simplewebauthn)**, and **[deno.land/x](https://deno.land/x/simplewebauthn)**
for import into **Node LTS 20.x and higher**, **Deno v1.43 and higher** projects, and other
compatible runtimes (Cloudflare Workers, Bun, etc...)

```sh
npm install @simplewebauthn/browser
npm install @simplewebauthn/server
npm install @simplewebauthn/types
```
See the packages' READMEs for more specific installation information.

The **server** and **types** packages are also available for import into **Deno v1.33.x** projects
from **deno.land/x**:
## Documentation

```ts
import {...} from 'https://deno.land/x/simplewebauthn/deno/server.ts';
import type {...} from 'https://deno.land/x/simplewebauthn/deno/types.ts';
```
In-depth documentation for this project is available at https://simplewebauthn.dev/docs

## Sponsors

Expand Down
31 changes: 16 additions & 15 deletions packages/browser/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,44 +4,45 @@

![WebAuthn](https://img.shields.io/badge/WebAuthn-Simplified-blueviolet?style=for-the-badge&logo=WebAuthn)
[![npm (scoped)](https://img.shields.io/npm/v/@simplewebauthn/browser?style=for-the-badge&logo=npm)](https://www.npmjs.com/package/@simplewebauthn/browser)
[![JSR](https://jsr.io/badges/@simplewebauthn/browser?style=for-the-badge)](https://jsr.io/@simplewebauthn/browser)
![Browser Support](https://img.shields.io/badge/Browser-ES5+-brightgreen?style=for-the-badge&logo=Mozilla+Firefox)

- [@simplewebauthn/browser](#simplewebauthnbrowser)
- [Installation](#installation)
- [Deno v1.43.x or higher](#deno-v143x-or-higher)
- [Node LTS 20.x and higher](#node-lts-20x-and-higher)
- [Deno v1.43 and higher](#deno-v143-and-higher)
- [UMD](#umd)
- [ES5](#es5)
- [ES2021](#es2021)
- [Usage](#usage)

## Installation

This package is available on **npm**:
This package can be installed from **NPM**, **JSR**, or **deno.land/x**:

### Node LTS 20.x and higher

```sh
npm install @simplewebauthn/browser
$ npm install @simplewebauthn/browser @simplewebauthn/types
```

This package can be installed from **NPM** or **JSR**:

```sh
$ npm install @simplewebauthn/browser
$ npx jsr add @simplewebauthn/browser @simplewebauthn/types
```

### Deno v1.43 and higher

```sh
$ npx jsr add @simplewebauthn/browser
$ deno add jsr:@simplewebauthn/browser jsr:@simplewebauthn/types
```

### Deno v1.43.x or higher

It is also available for import into Deno projects from **deno.land/x** or **JSR**:
```sh
$ deno add npm:@simplewebauthn/browser npm:@simplewebauthn/types
```

```ts
import {...} from 'https://deno.land/x/simplewebauthn/deno/browser.ts';
```

```sh
$ deno add jsr:@simplewebauthn/browser jsr:@simplewebauthn/types
import type {...} from 'https://deno.land/x/simplewebauthn/deno/types.ts';
```

### UMD
Expand All @@ -65,7 +66,7 @@ include the `ES5` version:

#### ES2021

If you only need to support modern browsers, include the `ES2018` version:
If you only need to support modern browsers, include the `ES2021` version:

```html
<script src="https://unpkg.com/@simplewebauthn/browser"></script>
Expand Down
29 changes: 16 additions & 13 deletions packages/server/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,38 +2,41 @@

![WebAuthn](https://img.shields.io/badge/WebAuthn-Simplified-blueviolet?style=for-the-badge&logo=WebAuthn)
[![npm (scoped)](https://img.shields.io/npm/v/@simplewebauthn/server?style=for-the-badge&logo=npm)](https://www.npmjs.com/package/@simplewebauthn/server)
[![JSR](https://jsr.io/badges/@simplewebauthn/server?style=for-the-badge)](https://jsr.io/@simplewebauthn/server)

- [Installation](#installation)
- [Node LTS 20.x or higher](#node-lts-20x-or-higher)
- [Deno v1.43.x or higher](#deno-v143x-or-higher)
- [Node LTS 20.x and higher](#node-lts-20x-and-higher)
- [Deno v1.43 and higher](#deno-v143-and-higher)
- [Usage](#usage)
- [Supported Attestation Formats](#supported-attestation-formats)

## Installation

### Node LTS 20.x or higher
This package can be installed from **NPM**, **JSR**, or **deno.land/x**:

This package can be installed from **NPM** (with support for **both CommonJS and
[ECMAScript modules (ESM)](https://nodejs.org/api/esm.html#enabling)** projects) or **JSR**:
### Node LTS 20.x and higher

```sh
$ npm install @simplewebauthn/server
$ npm install @simplewebauthn/server @simplewebauthn/types
```

```sh
$ npx jsr add @simplewebauthn/server
$ npx jsr add @simplewebauthn/server @simplewebauthn/types
```

### Deno v1.43.x or higher
### Deno v1.43 and higher

It is also available for import into Deno projects from **deno.land/x** or **JSR**:

```ts
import {...} from 'https://deno.land/x/simplewebauthn/deno/server.ts';
```sh
$ deno add jsr:@simplewebauthn/server jsr:@simplewebauthn/types
```

```sh
$ deno add jsr:@simplewebauthn/server jsr:@simplewebauthn/types
$ deno add npm:@simplewebauthn/server npm:@simplewebauthn/types
```

```ts
import {...} from 'https://deno.land/x/simplewebauthn/deno/server.ts';
import type {...} from 'https://deno.land/x/simplewebauthn/deno/types.ts';
```

## Usage
Expand Down
23 changes: 13 additions & 10 deletions packages/types/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,18 +2,19 @@

![WebAuthn](https://img.shields.io/badge/WebAuthn-Simplified-blueviolet?style=for-the-badge&logo=WebAuthn)
[![npm (scoped)](https://img.shields.io/npm/v/@simplewebauthn/types?style=for-the-badge&logo=npm)](https://www.npmjs.com/package/@simplewebauthn/types)
[![JSR](https://jsr.io/badges/@simplewebauthn/types?style=for-the-badge)](https://jsr.io/@simplewebauthn/types)

TypeScript typings for **@simplewebauthn/server** and **@simplewebauthn/browser**

- [Installation](#installation)
- [Node LTS 20.x or higher](#node-lts-20x-or-higher)
- [Deno v1.43.x or higher](#deno-v143x-or-higher)
- [Node LTS 20.x and higher](#node-lts-20x-and-higher)
- [Deno v1.43 and higher](#deno-v143-and-higher)

## Installation

### Node LTS 20.x or higher
This package can be installed from **NPM**, **JSR**, or **deno.land/x**:

This package can be installed from **NPM** or **JSR**:
### Node LTS 20.x and higher

```sh
$ npm install @simplewebauthn/types
Expand All @@ -23,14 +24,16 @@ $ npm install @simplewebauthn/types
$ npx jsr add @simplewebauthn/types
```

### Deno v1.43.x or higher
### Deno v1.43 and higher

It is available for import into Deno projects from **deno.land/x** or **JSR**:

```ts
import {...} from 'https://deno.land/x/simplewebauthn/deno/types.ts';
```sh
$ deno add jsr:@simplewebauthn/types
```

```sh
$ deno add jsr:@simplewebauthn/types
$ deno add npm:@simplewebauthn/types
```

```ts
import {...} from 'https://deno.land/x/simplewebauthn/deno/types.ts';
```

0 comments on commit bd5bc51

Please sign in to comment.