- Più recenti
- Maggior numero di voti
- Maggior numero di commenti
To implement an invitation code requirement during registration in Amazon Cognito, there are a few important considerations:
-
Custom attributes you create in your user pool won't automatically appear in the hosted UI. The standard hosted UI only displays standard attributes and required attributes.
-
For your invitation code implementation, you have a few options:
-
Use Lambda triggers: You can implement a pre sign-up Lambda trigger that validates the invitation code before allowing the user to complete registration. This would require custom code to verify the invitation code against your valid codes.
-
Use the newer Managed Login feature: Amazon Cognito's Managed Login offers more customization options than the classic Hosted UI, including support for choice-based authentication flows.
-
Create a custom UI: Instead of using the hosted UI, you could build your own registration interface that includes the invitation code field, then use the Amazon Cognito SDK to handle the registration process.
- If you're using custom attributes, remember that:
- You need to set read and write permissions for your custom attributes in your app client settings
- Immutable custom attributes can only be set during user creation
- Custom attributes require the "custom:" prefix when referenced in code
Amazon Cognito is designed to be customizable for authentication flows, including registration. The SDK is available in multiple programming languages (Java, C++, PHP, Python, Golang, Ruby, .NET, and JavaScript), giving you flexibility in how you implement your invitation code requirement.
Sources
Configuring policies for user creation - Amazon Cognito
Working with user attributes - Amazon Cognito
Hosted UI and overall user experience | AWS re:Post
Features | Amazon Cognito | Amazon Web Services (AWS)
Contenuto pertinente
- AWS UFFICIALEAggiornata 6 mesi fa
