Skip to content

Elastisearch OAuth with Cognito

This demo shows how to secure an Elasticsearch server by using Amazon Cognito. The workflow for the application is as follows:

  1. The app will validate if there is a valid token to be used
  2. In case the token is expired it will be redirected to an AWS API Gateway endpoint secured by Cognito.
  3. When the user is successfully authenticated it will be redirected back to the application.

Click here to see the live demo and use the following credentials to login:
user: test-user
pass: Test-u$3r

Review the complete source code and copy/paste it to create your own.
{"action": "import", "url": "../cf-demos/elastic-cognito-auth/index.html"}
{"action": "import", "url": "../cf-demos/elastic-cognito-auth/index.js"}