Close|CloudStack Canvas · How-To Guide
How-To Fix

Set Cognito OAuth Callback URLs

When OAuth/OIDC flows are enabled on a Cognito User Pool Client, you must specify at least one callback (redirect) URL. This is the URL Cognito redirects the user to after they sign in. It must exactly match the URL your app sends in the authorization request.

Paste into this field

Cognito → callbackUrls

Output looks like

https://app.example.com/callback

1Determine your callback URL

Your callback URL is the endpoint in your application that handles the authorization code exchange. Common patterns:

• React/Next.js with NextAuth: https://app.example.com/api/auth/callback/cognito

• Amplify default: https://app.example.com/

• Localhost for development: http://localhost:3000/callback

6Enable OAuth flows on the Cognito node

Select your Cognito node → property panel → toggle "Enable OAuth Flows" (under Advanced settings) to enable OAuth support.

8Enter callback URLs

In the "OAuth Callback URLs" field (also under Advanced settings), enter your callback URL. For multiple URLs, separate with commas.

10Development tip

Add both http://localhost:3000/callback (for local dev) and your production URL. Cognito accepts multiple callback URLs.

Once you have the value, go back to CloudStack Canvas and paste it into the highlighted field.

CloudStack Canvas · Validation Guide

Set Cognito OAuth Callback URLs — CloudStack Canvas