Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

In AWS Cognito - how to allow only specific email addresses from signing up?

I am using AWS Cognito in javascript with the amazon-cognito-identity-js package and it has been great.

I am wondering, how is it possible to only allow users with certain email address endings to go through the signup flow?

For example, only people who enter email address ending with [email protected] will be allowed to sign up and get the confirmation code sent to that email address. This will prevent people outside the company from accessing the application. The app does not have any top secret information, but we want only users within our company to access it.

I look to User Pool Settings and online but haven't been able to find a solution.

Thanks!

like image 650
andre Avatar asked Jun 07 '17 14:06

andre


People also ask

How do I customize my AWS Cognito login page?

To specify app UI customization settingsSign in to the Amazon Cognito console . In the navigation pane, choose User Pools, and choose the user pool you want to edit. Choose the App integration tab. To customize UI settings for all app clients, locate Hosted UI customization and select Edit.

How do I mark an email as verified on Cognito?

In the new Amazon Cognito console experience, you can manage verification in the Sign-up experience tab of your user pool. You can choose settings for email or phone verification under the MFA and verifications tab. For more information on multi-factor authentication (MFA), see SMS Text Message MFA.

What does Cognito use to create unique identities and authorize users?

With a user pool, your app users can sign in through the user pool or federate through a third-party identity provider (IdP). Identity pools are for authorization (access control). You can use identity pools to create unique identities for users and give them access to other AWS services.

Can we create user in Cognito without password?

For users to be able to sign themselves up, we have to “generate” a password for them, because a password is required by Amazon Cognito when users sign up.


1 Answers

You can use the Pre Sign Up Lambda trigger to check the user's email and then accept or deny the registration request, more info.

like image 198
Rachit Dhall Avatar answered Oct 22 '22 10:10

Rachit Dhall