Skip to content
LogoLogo

Configure your app after deployment

After your first setup, configure where your app runs and how its users join. Use a development deployment while learning. You need your SaaSLayer organization-owner login for deployment settings and a separate deployment login for your app's administrator operations.

Set your app URL and browser origins

user-service.AppUrl is the URL used for email links. It can include a base path, such as https://app.example.com/product, but cannot include a query or fragment. user-service.AllowedAppOrigins lists browser origins without paths or wildcards; it defaults to the origin of AppUrl.

To configure an app served under /product, run:

saaslayer deployment settings set --env dev --reason "configure the app URL and browser origin" \
  --set user-service.AppUrl=https://app.example.com/product \
  --set user-service.AllowedAppOrigins=https://app.example.com

Replace the URLs with your app's address. Review the selected project and region before applying the update. Email links keep the base path.

For social login, configure AllowedCallbackUrls with the exact page addresses that host your widgets, including their paths and trailing slashes. See Connect Users to your app and Sign-in options for callback and passkey settings. Changing a passkey relying party can leave existing passkeys unable to sign in; follow the migration guidance in the sign-in guide.

Activate the first administrator

The account that manages SaaSLayer is separate from the first administrator of your deployed services. Sign in with the administrator's deployment login, then record that person's activation using the access-administrator flow. An assigned administrator who has not activated does not yet count as usable.

If the initial setup email is lost or expired, the deployment owner can request another while the first account still needs its initial password change:

saaslayer users first-admin resend --env dev --reason "resend the initial setup email"

This does not rotate the password of an administrator who has completed setup. Check Manage users for ordinary account operations.

Apply your access model and bootstrap an organization

Your app's runtime organizations are separate from your SaaSLayer management organization. Prepare an authorization model for your product and use an administrative Permissions API credential for the following operations. Set PERMISSIONS_API to the endpoint reported by your deployment and PERMISSIONS_TOKEN to that credential.

To review and apply your model, run:

saaslayer permissions model apply authorization-model.json --api-base "$PERMISSIONS_API" --token "$PERMISSIONS_TOKEN" --dry-run
saaslayer permissions model apply authorization-model.json --api-base "$PERMISSIONS_API" --token "$PERMISSIONS_TOKEN"

Replace authorization-model.json with your model file. Review the dry-run result before applying it. The service checks the model's probes before accepting it. See Model your authorization.

Create the runtime organization, add the intended owner's stable user ID, then bootstrap that member as the first owner:

saaslayer permissions orgs create "Example team" --api-base "$PERMISSIONS_API" --token "$PERMISSIONS_TOKEN"
saaslayer permissions orgs members add ORG_ID --user USER_ID --api-base "$PERMISSIONS_API" --token "$PERMISSIONS_TOKEN"
saaslayer permissions owner bootstrap PRODUCT --org ORG_ID --user USER_ID --api-base "$PERMISSIONS_API" --token "$PERMISSIONS_TOKEN"

Replace ORG_ID with the returned organization ID, USER_ID with the person's SaaSLayer user ID (custom:suid, not the Cognito sub), and PRODUCT with your model's product identifier. Owner bootstrap works only while that organization has no owner; later changes follow your model's delegation rules.

Configure your email sender

To send from your domain, verify the SES identity in the deployment's AWS account and region and configure its DNS records. Check the account's SES sending status; sandbox restrictions apply until production access is granted.

Set user-service.CognitoEmailSenderArn to that verified identity ARN and user-service.CognitoEmailFromAddress to the sender address using your deployment settings. Use the schema offered for the selected release rather than copying another deployment's account ID or sender configuration.

Organization invitation delivery also needs AppUrl, a configured sender and an accept page in your app. See Invite people to your app by email.