Skip to content

Auth ​

Auth gives users of your product an identity. Create a user pool, add an app client, sign those people in with an email code, and protect a Gateway route with the pool. They sign in to your application, not to Skippr Cloud.

People who operate this Skippr Cloud account use Cloud User Directory instead.

Status: Preview. See API actions for the full command list.

What you can do ​

  • Create a user pool for the people who use your SaaS app, mobile app, or portal.
  • Add an app client for the application that will sign those users in.
  • Sign a pool user in with an email code and receive a token for your app.
  • Attach the pool to a Gateway authorizer so only those users can call a route.

If your product has more than one customer, keep that tenancy in your app — for example an org id on the pool user — and enforce it in your functions. App user pools do not create extra Skippr Cloud accounts.

Before you start ​

Sign in to this Cloud account with skippr-cloud login. See Cloud User Directory.

Create a pool and an app client ​

bash
skippr-cloud auth create-user-pool --name customers
skippr-cloud auth list-user-pools

Save the returned poolId. Then add an app client for the application that will sign users in:

bash
skippr-cloud auth create-app-client --input - <<JSON
{
  "poolId": "<poolId>",
  "name": "web",
  "callbackUrls": ["https://app.example.com/callback"]
}
JSON

Sign pool users in ​

Users of that pool sign in with an email code:

bash
skippr-cloud auth pool-sign-in --pool-id '<poolId>' --email user@example.com
skippr-cloud auth pool-confirm --pool-id '<poolId>' --email user@example.com --code '<code>' --app-client-id '<clientId>'

pool-confirm returns tokens for that user in that pool. Refresh and sign out with skippr-cloud auth pool-refresh and skippr-cloud auth pool-logout.

Protect a Gateway route ​

bash
skippr-cloud gateway create-authorizer --api-id '<apiId>' --authorizer-type USER_POOL --user-pool-id '<poolId>' --app-client-id '<clientId>'

Only tokens from that pool (and client, when you set app-client-id) can call the route. See Gateway.

Manage pools ​

TaskCommand
List poolsskippr-cloud auth list-user-pools
Describe a poolskippr-cloud auth describe-user-pool --pool-id '<poolId>'
Delete a poolskippr-cloud auth delete-user-pool --pool-id '<poolId>'
List app clientsskippr-cloud auth list-app-clients --pool-id '<poolId>'
Describe an app clientskippr-cloud auth describe-app-client --pool-id '<poolId>' --client-id '<clientId>'
Delete an app clientskippr-cloud auth delete-app-client --pool-id '<poolId>' --client-id '<clientId>'

Auth identifiers ​

IdentifierWhat it identifies
poolIdAn app user pool
clientIdAn application in a pool
Pool user emailA person who signs in to your product

Limits and errors ​

LimitValue
User pools per account25
App clients per pool25
Pool name128 characters; letters, numbers, spaces, _, and -
Callback URLs per client10
OTP attempts per code5
Access token lifetime15 minutes
Refresh token lifetime365 days
  • 400: the email, code, identifier, or request is invalid.
  • 401: the pool session expired. Sign the pool user in again.
  • 403: the signed-in Cloud account is not allowed to manage this pool.
  • 404: the pool or client does not exist.
  • 429: wait, then retry.

Email invites and signing pool users in with a company identity provider are coming soon.