.. _howto/auth/awscognito: ============================== Authenticate using AWS Cognito ============================== The **AWS Cognito Authenticator** lets users log into your JupyterHub using cognito user pools. To do so, you'll first need to register and configure a cognito user pool and app, and then provide information about this application to your ``tljh`` configuration. Create an AWS Cognito application ========================================= #. Create a user pool `Getting Started with User Pool `_. When you have completed creating a user pool, app, and domain you should have the following settings available to you: * **App client id**: From the App client page * **App client secret** From the App client page * **Callback URL** This should be the domain you are hosting you server on:: http(s):///hub/oauth_callback * **Signout URL**: This is the landing page for a user when they are not logged on:: http(s):// * **Auth Domain** Create an auth domain e.g. :: https://<.auth.eu-west-1.amazoncognito.com Install and configure an AWS EC2 Instance with userdata ======================================================= By adding following script to the ec2 instance user data you should be able to configure the instance automatically, replace relevant placeholders:: #!/bin/bash ############################################## # Ensure tljh is up to date ############################################## curl -L https://tljh.jupyter.org/bootstrap.py \ | sudo python3 - \ --admin insightadmin ############################################## # Setup AWS Cognito OAuthenticator ############################################## echo > /opt/tljh/config/jupyterhub_config.d/awscognito.py <