Skip to content
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
16 changes: 11 additions & 5 deletions docs/api-contract.md
Original file line number Diff line number Diff line change
Expand Up @@ -71,11 +71,17 @@ That is what lets one tenant serve a web client and a mobile client without them
single destination. The token is set as a `token` query parameter on the target, replacing one
of that name the caller had already put there.

The allowlist is the WebAuthn `origins` list because there is no dedicated one yet. A
destination that cannot be expressed as one of those, a custom scheme such as `myapp://` or a
universal link on a host that is not a WebAuthn origin, needs a `magic_link_redirect_uris`
system config key. That key lives in `@seamless-auth/types` and so needs a version bump and a
coordinated release across this API and both SDKs.
A destination that cannot be expressed as an origin, a custom scheme such as `myapp://auth` or a
universal link on a host that is not a WebAuthn origin, goes in the `magic_link_redirect_uris`
system config key instead. Entries there are matched exactly, which is what makes a custom
scheme safe to accept: there is no origin to compare, so only a literal an operator listed is
allowed. The key defaults to `[]`, and an empty list falls back to comparing against `origins`,
so a deployment that sets nothing behaves as described above.

Setting it narrows rather than widens. Once the list is non-empty it is the whole allowlist, and
a destination on a configured origin that is not listed is refused. That is deliberate: a tenant
that needs a mobile scheme should not have to widen `origins`, which gates passkey ceremonies, to
get it.

### Error body

Expand Down
1 change: 1 addition & 0 deletions docs/configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -312,6 +312,7 @@ Validation is enforced by [`systemConfig.schema.ts`](../src/schemas/systemConfig
| `rpid` | string | `RPID` | - |
| `origins` | url[] | `ORIGINS` | - |
| `frontend_url` | url | `FRONTEND_URL` | - |
| `magic_link_redirect_uris` | string[] | `MAGIC_LINK_REDIRECT_URIS` | `[]` |

## Environment vs `system_config`

Expand Down
Loading