Creating an App Client in AWS Cognito

Walter Mike
2 min readNov 27, 2023

--

Introduction

An app client in AWS Cognito serves as a bridge between your application and Cognito, enabling secure access to user identities and profile information. It allows your application to authenticate users, manage their identities, and access their authorized resources.

Prerequisites

  • An AWS account with IAM user access
  • An existing user pool in AWS Cognito

Steps

Select the User Pool:

  • Navigate to the Amazon Cognito console and sign in using your AWS credentials.
  • In the left navigation pane, select Identity Pool.
  • Choose the user pool you created earlier.
  • Click on the App Clients tab.

Create a New App Client:

  • Click on the Add new client button.
  • Enter a descriptive name for your app client, such as “SupersetApp”.
  • Select the Generated Client Secret option.
  • Copy the generated client secret as you will need it later for configuring your application.
  • Choose the OAuth flows that your app client will support. Common flows include “user agent” for web applications and “native” for mobile applications.
  • Specify the scope of access that your app client will have. Common scopes include “openid” for basic profile information and “profile” for more detailed profile data.
  • Click on the Create button.

Configure Additional Settings (Optional):

  • Depending on your application’s requirements, you may need to configure additional settings for your app client. These settings may include:
  • Allowed callback URLs for redirection after authentication
  • Allowed logout URLs
  • JavaScript origins for embedded authentication widgets
  • Click on the Save button to apply the changes.

Code Example

Here is an example of how to create an app client using the AWS CLI:

bash

Replace <user-pool-id> with the ID of your user pool and <app-client-name> with the name of your app client.

Conclusion

You have successfully created an app client in AWS Cognito. This app client will be ready to be used in your application to authenticate users and access their identities securely. Remember to keep the generated client secret confidential as it is used for secure communication between your application and Cognito.

--

--

No responses yet