Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

API Key Management #81

Merged
merged 2 commits into from
Jan 10, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 10 additions & 1 deletion src/.vuepress/config.js
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,16 @@ module.exports = {
]
},
'errors',
'admin-console',
{
title: 'Admin Console',
path: '/guide/admin-console',
collapsable: true,
children: [
['/guide/admin-console/applications', 'Applications'],
['/guide/admin-console/billing', 'Billing'],
['/guide/admin-console/admins', 'Admins']
]
},
'concepts'
]
}
Expand Down
55 changes: 3 additions & 52 deletions src/guide/admin-console.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,55 +6,6 @@ The [Admin Console](https://admin.passwordless.dev/) is your primary GUI for cre

Once you create a new application, you'll have a handful of pages available to you.

## Applications

The number of applications you can create depends on your [plan](https://bitwarden.com/products/passwordless/#pricing). Select an application to view the following components:

### Get started

The **Get Started** page walks you through the preliminary steps for getting Passwordless.dev running in your application. This information is very similar to what's documented in the [Get Started](get-started) guide.

:::warning
This page contains your [API keys](concepts.md#api-keys). It's important to download your API keys to a safe place, as they will be removed from the admin console after 7 days.
:::

### Users

The **Users** page allows you to monitor the end-users with passkeys registered for your application. For each user, as determined by their `userId`, you'll be able to view:

#### Credentials

Credentials registered to each user are listed. [Learn what data is stored for each credential](concepts.md#credential).

#### Aliases

Aliases registered to teach user are listed, however aliases that are hashed cannot be viewed here ([learn more](api.md#alias)).

### Settings

The **Settings** page will offer some options for configuring your application, including what [plan](https://bitwarden.com/products/passwordless/#pricing) your application is on. More to come.

### Playground

The **Playground** page gives access to a simple passwordless demo you can use for testing devices.

## Billing

The **Billing** page allows you to upgrade to a [paid organization](https://bitwarden.com/products/passwordless/#pricing) and view a list of applications attached to your account.

## Admins

The **Admins** page allows you to invite other administrators to your Passwordless.dev organization to manage applications, billing, and more. All admins, including whomever created the Passwordless.dev account and any applications, have **equal permissions within the organization**.

![Admin page](./admin-page.png)

To invite an admin:

1. Enter an email address in the **Invitees** text input and select **Send Invite**.
2. Your future-admin will receive an invite email. Instruct them to use this invite to complete registration for Passwordless.dev and, subsequently, to follow the email verification step.

Admins can be deleted from this same page.

:::warning
Due to all admins having equal permissions within the organization, it is currently possible for a newly-invited admin to delete a previously-provisioned admin from the organization.
:::
- [Applications](./admin-console/applications.md)
- [Billing](./admin-console/billing.md)
- [Admins](./admin-console/admins.md)
16 changes: 16 additions & 0 deletions src/guide/admin-console/admins.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# Admins

The **Admins** page allows you to invite other administrators to your Passwordless.dev organization to manage applications, billing, and more. All admins, including whomever created the Passwordless.dev account and any applications, have **equal permissions within the organization**.

![Admin page](../admin-page.png)

To invite an admin:

1. Enter an email address in the **Invitees** text input and select **Send Invite**.
2. Your future-admin will receive an invite email. Instruct them to use this invite to complete registration for Passwordless.dev and, subsequently, to follow the email verification step.

Admins can be deleted from this same page.

:::warning
Due to all admins having equal permissions within the organization, it is currently possible for a newly-invited admin to delete a previously-provisioned admin from the organization.
:::
40 changes: 40 additions & 0 deletions src/guide/admin-console/applications.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
# Applications

## Get started

The **Get Started** page walks you through the preliminary steps for getting Passwordless.dev running in your application. This information is very similar to what's documented in the [Get Started](../get-started) guide.

:::warning
This page contains your [API keys](../concepts.md#api-keys). It's important to download your API keys to a safe place, as they will be removed from the admin console after 7 days.
:::

## Playground

The **Playground** page gives access to a simple passwordless demo you can use for testing devices.

## Users

The **Users** page allows you to monitor the end-users with passkeys registered for your application. For each user, as determined by their `userId`, you'll be able to view:

### Credentials

Credentials registered to each user are listed. [Learn what data is stored for each credential](../concepts.md#credential).

### Aliases,

Aliases registered to teach user are listed, however aliases that are hashed cannot be viewed here ([learn more](../api.md#alias)).

## Settings

The **Settings** page will offer some options for configuring your application, including what [plan](https://bitwarden.com/products/passwordless/#pricing) your application is on. More to come.

### Api key management

There are several operations you can perform on your API keys:

| Operation | Condition | Reversible | Description |
| --------- | ------------------- | ---------- | ------------------------------------------------------------------------------------------------------------------------------------- |
| Lock | API key is unlocked | Yes | Locking an API key will prevent it from being used. You will typically receive a 403 HTTP status code. |
| Unlock | API key is locked | Yes | Unlocking an API key will allow it to be used again. |
| Create | | Yes | Creating an API key will allow you to interact with the Passwordless.dev API. You are allowed to create as many API keys as you like. |
| Delete | Api key is locked | No | Deleting an API key will permanently remove it. |
3 changes: 3 additions & 0 deletions src/guide/admin-console/billing.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# Billing

The **Billing** page allows you to upgrade to a [paid organization](https://bitwarden.com/products/passwordless/#pricing) and view a list of applications attached to your account.
11 changes: 11 additions & 0 deletions src/guide/errors.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,17 @@ if (error) {

## List of error codes

### api_key_locked

You'll receive this error when you call an endpoint with an API key that has been locked.

This could happen due to several reasons:

- Either you've locked the API keys yourself.
- Your application was marked for deletion, which causes the API keys to be locked automatically.

If this was unintentional, you can unlock the API key in the [admin console](admin-console/applications.md#api-key-management).

### invalid_token

The token that was submitted did not contain the expected value. This error often occurs when something goes wrong earlier in the process and the error message is sent instead of a valid token.
Expand Down
2 changes: 1 addition & 1 deletion src/guide/get-started.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ In this guide we'll provide JavaScript examples, however you can check out sampl

[Sign up](https://admin.passwordless.dev/signup) for a free Passwordless.dev account. Bitwarden offers a free Passwordless.dev account, or [paid plans](https://bitwarden.com/products/passwordless/#pricing) that unlock certain tiers of usage and features.

When you sign up you'll land on the [admin console](admin-console), your primary GUI for creating and configuring applications, monitoring application usage, and managing billing:
When you sign up you'll land on the [admin console](admin-console.md), your primary GUI for creating and configuring applications, monitoring application usage, and managing billing:
</br>
</br>
![Admin console](./admin-console.png)
Expand Down
Loading