Skip to content
Open
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
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
2 changes: 1 addition & 1 deletion _snippets/javascript--api--near.mdx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<ResponseField name="near" type="object">
The `near` API allows you to interact with the Rownd's [NEAR integration](../configuration/web3/near-overview.mdx).
The `near` API allows you to interact with the Rownd's [NEAR integration](/configuration/web3/near-overview).

<ResponseField name="ensureImplicitAccount()" type="function">
Creates an implicit NEAR account for the current user if one doesn't already exist
Expand Down
2 changes: 1 addition & 1 deletion configuration/authentication-methods/overview.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ Rownd's adaptive sign-in can detect the user's device and adjust the available a
### Customizing sign in methods by device on the Rownd platform
1. **Navigate to the Sign in methods tab:** After installing Rownd with a code snippet or SDK, navigate to the sign in methods tab in the Rownd Platform.
![Check out the sign in methods tab.](/images/Sign-in-methods-page.png)
2. **Configure [mobile app settings](configuration/mobile.mdx):** If you have a mobile app, configure your Google, Apple and mobile settings to get started. This will ensure proper deep linking to your mobile apps with your new customizations.
2. **Configure [mobile app settings](/configuration/mobile/overview):** If you have a mobile app, configure your Google, Apple and mobile settings to get started. This will ensure proper deep linking to your mobile apps with your new customizations.
![Configure mobile app settings](/images/Mobile-app-settings2.png)
3. **Customize sign in method orders by device:** Select the device type at the top (Desktop, iOS, Android), drag, drop, prioritize, and hide methods until you’re liking your customizations for each device type. We recommend prioritizing Apple sign in on iOS devices and prioritizing Google sign in on Android devices.
![Customize the order and visability by device.](/images/iOS-customize-sign-in-method.png)
Expand Down
4 changes: 2 additions & 2 deletions configuration/customizations/global-style.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -39,13 +39,13 @@ Rownd offers a range of style customizations to best match your brand look and f

Global styles will span across all Rownd UI elements, but you have additional customization options for the content and appearances of Rownd emails, modals, and screens.

- **[Email customizations](configuration/customizations/email-customization.mdx).** Customize the language and logo that appear in user verification emails for email sign in.
- **[Email customizations](/configuration/customizations/email-customization).** Customize the language and logo that appear in user verification emails for email sign in.

- **Sign in modal.** From the "Modals" tab, you can update the content, visuals, and links on your Rownd sign in modal.

- **Verification modal.** From the "Modals" tab, you can update the content and visuals on your Rownd verification modal.

- **App download screen.** From the "Emails and screens" tab, you can update the content and visuals on the Rownd App download screen. This screen appears if your user is attempting mobile app sign in and does not yet have the app on their device. Be sure to configure your [mobile app settings](configuration/mobile.mdx) for this to work properly.
- **App download screen.** From the "Emails and screens" tab, you can update the content and visuals on the Rownd App download screen. This screen appears if your user is attempting mobile app sign in and does not yet have the app on their device. Be sure to configure your [mobile app settings](/configuration/mobile/overview) for this to work properly.

<div style={{ position: 'relative', paddingBottom: '67.58448060075094%', height: '0' }}><iframe src="https://www.loom.com/embed/92bbbd56032f4138a81f99dfef81cf1d" frameborder="0" webkitallowfullscreen mozallowfullscreen allowfullscreen style={{ position: 'absolute', top: '0', left: '0', width: '100%', height: '100%'}}></iframe></div>

Expand Down
2 changes: 1 addition & 1 deletion migration/cognito.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ Here's what you'll work through as part of this migration:
## Update back-end code
You'll need to update your backend APIs to accept Rownd-signed JWTs instead of AWS Cognito JWTs.

1. Install the Rownd SDK for your [back-end language or framework](/sdk-reference/backend).
1. Install the Rownd SDK for your [back-end language or framework](/sdk-reference/backend/overview).
2. Locate code that uses the AWS Cognito to manage users, validate tokens, and so on. Remove this code.

Our SDKs provide functions to validate Rownd tokens, fetch user data, and in some cases middleware that you can plug directly into your request handlers to authenticate users automatically.
Expand Down
4 changes: 2 additions & 2 deletions migration/firebase.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ Some Firebase apps don't have a back-end component. If that's the case for you,
In most cases, you should be able to remove all Firebase Authentication-related code from any backend servers or functions you're using. Take the following steps to migrate your back-end from Firebase Authentication to Rownd.

1. If you're only using Firebase Authentication, uninstall Firebase SDKs from your back-end project.
2. Install the Rownd SDK for your [back-end language or framework](/sdk-reference/backend).
2. Install the Rownd SDK for your [back-end language or framework](/sdk-reference/backend/overview).
2. Locate code that uses the Firebase SDK to manage users, validate tokens, and so on. Remove this code.
3. Replace the previous Firebase code with Rownd code. See our [GitHub repo](https://github.com/rownd/migration-firebase) for an example of this code migration.

Expand All @@ -36,7 +36,7 @@ Firebase provides a limited amount of pre-built UI, so it's likely you've create
<Info>If you plan to keep existing users signed-in (and you should!), keep your Firebase SDKs installed until you've migrated all of your active users to Rownd. This usually takes a month or two depending on your users' behavior patterns.</Info>

1. Remove existing authentication code, authentication screens, and so on. (If you're migrating a mobile app, you may want to keep the splash screen, although Rownd can help you let users into your app before they fully authenticate).
2. Install a [front-end web SDK](/sdk-reference/web) or [mobile SDK](/sdk-reference/mobile) for your platform or framework.
2. Install a [front-end web SDK](/sdk-reference/web/overview) or [mobile SDK](/sdk-reference/mobile/overview) for your platform or framework.
3. Add the required bits of Rownd code to authenticate users and protect your front-end.

Here's an example where we'll update the front-end and replace Firebase authentication with Rownd. React code examples are provided for demonstration purposes.
Expand Down
20 changes: 20 additions & 0 deletions rownd-docusaurus/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# Dependencies
/node_modules

# Production
/build

# Generated files
.docusaurus
.cache-loader

# Misc
.DS_Store
.env.local
.env.development.local
.env.test.local
.env.production.local

npm-debug.log*
yarn-debug.log*
yarn-error.log*
41 changes: 41 additions & 0 deletions rownd-docusaurus/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
# Website

This website is built using [Docusaurus](https://docusaurus.io/), a modern static website generator.

## Installation

```bash
yarn
```

## Local Development

```bash
yarn start
```

This command starts a local development server and opens up a browser window. Most changes are reflected live without having to restart the server.

## Build

```bash
yarn build
```

This command generates static content into the `build` directory and can be served using any static contents hosting service.

## Deployment

Using SSH:

```bash
USE_SSH=true yarn deploy
```

Not using SSH:

```bash
GIT_USER=<Your GitHub username> yarn deploy
```

If you are using GitHub pages for hosting, this command is a convenient way to build the website and push to the `gh-pages` branch.
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
---
title: "Create a magic link"
openapi: "POST /hub/auth/magic"
---

Generate a magic link for user authentication or as a short link.

<Endpoint method="POST" path="/hub/auth/magic" baseUrls={['https://api.rownd.io']} />

### Request

Headers:

- `X-Rownd-App-Key: <your-app-key>`
- `X-Rownd-App-Secret: <your-app-secret>`

Body (JSON):

```json
{
"purpose": "auth",
"redirect_url": "/somewhere/in/my/app",
"expiration": "30d",
"link_data": {"utm": "newsletter"},
"verification_type": "email",
"data": {"email": "user@example.com"}
}
```

### Try it

```bash title="cURL"
curl --request POST \
--url https://api.rownd.io/hub/auth/magic \
--header 'X-Rownd-App-Key: <your-app-key>' \
--header 'X-Rownd-App-Secret: <your-app-secret>' \
--header 'Content-Type: application/json' \
--data '{
"purpose": "auth",
"redirect_url": "/somewhere/in/my/app",
"expiration": "30d",
"link_data": {"utm": "newsletter"},
"verification_type": "email",
"data": {"email": "user@example.com"}
}'
```

### Response

200 - application/json

```json title="200 OK"
{
"link": "https://rownd.link/abc123",
"link_meta": {
"purpose": "auth",
"redirect_url": "/somewhere/in/my/app"
}
}
```

<Info>
Links created with purpose `auth` should only be sent to a single user. Use `shorten` for broadcast links.
</Info>
38 changes: 38 additions & 0 deletions rownd-docusaurus/api-reference/authentication/overview.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
---
title: "Authentication Overview"
sidebarTitle: Overview
---

Rownd's API leverages two authentication mechanisms depending on which operation you're invoking. **User-scoped** APIs enable your users to manage their profile information, register passkeys, set preferences, and so on. **App-scoped** APIs allow you to manage aspects of your app, read and update user profiles, add or remove users, and fetch keys necessary for validating a user's bearer token.

Rownd leverages API keys for app-scoped authentication. You'll see these referred to as "app keys" throughout the platform and documentation.

To generate a new app key/secret pair, see this [reference guide](/configuration/app-credentials).

### App-scoped authentication

When making calls to the Rownd REST API, you must include your app key/secret pair in the request headers. The app key is used to identify the app making the request, and the secret is used to authenticate the request.

Ensure the following headers are present:

- `X-Rownd-App-Key: <your-app-key>`
- `X-Rownd-App-Secret: <your-app-secret>`

<Info>
User-initiated requests leverage bearer token authentication, which is generated when a user signs in. You'll usually leverage this token from one of our SDKs in order to call user-based Rownd APIs in addition to your own API stack.
</Info>

### User-scoped authentication

In most cases, Rownd's SDKs and the Rownd Hub call Rownd APIs on behalf of a user. In these cases, the user's bearer token is included in the request headers. The bearer token is used to identify the user making the request, and to authenticate the request.

We recommend that you use Rownd bearer tokens to authenticate users against your own API or service. Since Rownd's tokens are signed asymmetrically, you can use our public JWK set to validate a token's signature.

<Info>
If you're using a Rownd server SDK (e.g., Node.js), convenience methods or middleware are provided to automatically validate a bearer token and attach the user's profile to the request object.
</Info>

Use these endpoints to fetch our OIDC and/or JWK configurations:

- [OIDC configuration](/api-reference/authentication/retrieve-oidc)
- [JWK set](/api-reference/authentication/retrieve-jwk)
38 changes: 38 additions & 0 deletions rownd-docusaurus/api-reference/authentication/retrieve-jwk.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
---
title: "Retrieve Rownd JWK set"
openapi: "GET /hub/auth/keys"
---

Retrieve the current JWK set that validates Rownd-issued tokens.

<Endpoint method="GET" path="/hub/auth/keys" baseUrls={['https://api.rownd.io','https://api.us-east-2.dev.rownd.io']} />

### Try it

```bash title="cURL"
curl --request GET \
--url https://api.rownd.io/hub/auth/keys
```

### Response

200 - application/json — Keys retrieved successfully

```json title="200 OK"
{
"keys": [
{
"kty": "OKP",
"alg": "EdDSA",
"kid": "sig-1644937360",
"use": "sig",
"crv": "Ed25519",
"x": "ChrFqbu1T7TTuLFg3o_coBNwqdm_O5Llok1dey0G2Tg"
}
]
}
```

<Info>
Use these keys to validate Rownd JWTs in your backend. Keys may rotate; always fetch the current set.
</Info>
33 changes: 33 additions & 0 deletions rownd-docusaurus/api-reference/authentication/retrieve-oidc.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
---
title: "Retrieve OIDC configuration"
openapi: "GET /hub/auth/.well-known/oauth-authorization-server"
---

Retrieve Rownd's OAuth 2.0/OIDC metadata document.

<Endpoint method="GET" path="/hub/auth/.well-known/oauth-authorization-server" baseUrls={['https://api.rownd.io','https://api.us-east-2.dev.rownd.io']} />

### Try it

```bash title="cURL"
curl --request GET \
--url https://api.rownd.io/hub/auth/.well-known/oauth-authorization-server
```

### Response

200 - application/json — OIDC configuration

```json title="200 OK"
{
"issuer": "https://api.rownd.io/hub/auth",
"authorization_endpoint": "https://api.rownd.io/hub/auth/authorize",
"token_endpoint": "https://api.rownd.io/hub/auth/token",
"jwks_uri": "https://api.rownd.io/hub/auth/keys"
// ... properties omitted
}
```

<Info>
Use this document to dynamically configure OpenID Connect clients and discover Rownd endpoints.
</Info>
68 changes: 68 additions & 0 deletions rownd-docusaurus/api-reference/groups/overview.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
---
title: Groups overview
sidebarTitle: Overview
description: Groups API documentation
---

With Rownd groups, you can segment your application users into logical segments. Each segment contains group members
which are tied back to application users via their `user_id`. With the group APIs, you can add a group member
directly or by creating a group invite. Group invites result in a one-time-use link that you can send to a
user that when visited adds them to the group with specific roles. Each group member is assigned to roles,
which are an array of strings like `"admin"` or `"editor"`. You can specify member roles via member creation
or updates, or during an invite creation.

The groups APIs are split into two sets that differ slighly on imlementation: [Platform](#platform) and
[User-Facing](#userfacing)

## Platform
The [platform](/api-reference/groups/platform/group-create) APIs accept Rownd application credentials for authentication. They are intended for use by an
application administrator. You should use these APIs on your backend server or equivalent to manage groups,
members, and invites

## User-Facing
The [user-facing](/api-reference/groups/user/group-create) APIs accept an authenticated user's Rownd access token (JWT) for authentication. This set of APIs is intended for use in frontend applications when you want to give your
users the ability to manage their own groups, members, and invites.

### User-Facing Distinctions
The user-facing APIs differ slightly in implementation. Here are the main differences:

#### Authorization
Group members and invites can only be managed by group owners. A group owner is a group member that has the
`"owner"` role.

#### Group Owners
The creator of a group is always given the `"owner"` role.

## Getting Started

Here are a few key endpoints to help you get started integrating Groups into your app:
<CardGroup>
<Card
title="Create a group"
icon="user-group"
color="#339933"
href="/api-reference/groups/platform/group-create">
Platform API for creating a group
</Card>
<Card
title="Create a group invite"
icon="paper-plane"
color="#3f3fc3"
href="/api-reference/groups/platform/invites/invite-create">
Platform API for creating a group invite
</Card>
<Card
title="Update a group member"
icon="user"
color="#5b13df"
href="/api-reference/groups/platform/members/member-update">
Platform API for updating a group member
</Card>
<Card
title="Delete a group member"
icon="user-slash"
color="#ff0000"
href="/api-reference/groups/platform/members/member-delete">
Platform API for deleting a group member
</Card>
</CardGroup>
Loading