
- Aws android sdk how to#
- Aws android sdk android#
- Aws android sdk verification#
- Aws android sdk password#
UserAttributes.addAttribute("email", emailAddress) Ĭreate a callback handler for sign up. UserAttributes.addAttribute("phone_number", phoneNumber) UserAttributes.addAttribute("given_name", userGivenName) Note that the key is "given_name" which is the OIDC claim for given name Create a CognitoUserAttributes object and add user attributesĬognitoUserAttributes userAttributes = new CognitoUserAttributes() We had earlier set email, given name, and phone number as required attributes.Īfter you collect these details from your user, you can use the pool instance to sign up the user. They must include the required attributes set for your pool. User attributes: These are other user details. password: This will be the users’ password.ģ. user-id: This will be used by the user to login and must be unique with-in the pool.Ģ. To sign up a user, you will need to provide the following information from the user:ġ. Using this pool instance, you can sign up new users to the pool. Create a CognitoUserPool object to refer to your user poolĬognitoUserPool userPool = new CognitoUserPool(context, poolId, clientId, clientSecret, clientConfiguration) Choosing default configurationĬlientConfiguration clientConfiguration = new ClientConfiguration() To create this object, you will need the poolId, clientId and clientSecret (if generated for the clientId). This will be the entry point for all interactions with your Cognito user pool from your app. Start by creating a CognitoUserPool object.
Aws android sdk android#
Using Amazon Cognito User Pools in your Android app You now have a user pool and users can sign up in this pool. For this walkthrough we will not set up customization through Lambda.ĩ) Review the settings and choose “ Create pool” to create your user pool. If you chose to generate a client secret for your client ID you must use the generated client secret whenever you use the client ID in your apps.Ĩ) The next step allows you to customize workflows through Lambda triggers. You can also generate a client secret along with the client ID, but it’s not required. This can be any string that helps you identify how this client-id is used, e.g., “my social network Android app”.

Click Add an app and provide your the name of your app. A client ID is required to allow your app to interact with your user pool.
Aws android sdk verification#
We will leave MFA turned off for users in this pool.Ħ) Next, you can customize the messages that are sent to users in your pool to deliver various verification codes.ħ) The next step is to create a client ID for your app.
Aws android sdk password#
The user will still be able to sign in with his or her username.Ĥ) The next step is to set the password requirements we will use default password settings.ĥ) In the next step you can enable multi-factor authentication (MFA) for users in this pool. If a user in this pool has verified his or her email address, then this user can use that email address to sign in. Let’s choose email, given name and phone number as required parameters and email and phone number as aliases. Some attributes can be used as aliases, which means that users can sign in with the aliases instead of their username, if these attributes are verified. The attributes you select as “Required” are must-have values for users to sign-up in the pool. You can choose Review defaults to create the pool with default settings.ģ) Choose the required attributes for users in your pool. This opens the page where you can see all of your Cognito user pools and also create new pools.Ģ) Provide a name for your pool and choose Step through settings to start customizing the pool. For a walk-through on getting started with iOS, please visit this blog.īefore you can use the SDK, you must create a user pool.ġ) Start by signing in to the Amazon Cognito console and choosing Manage your User Pools.


For guidance on iOS or JavaScript see the Amazon Cognito Developer Guide.
Aws android sdk how to#
In this blog we will show how to get started with the Mobile SDK for Android. You can use these SDKs in your apps to interact with your user pools. You also benefit from the security and privacy best practices of AWS.ĪWS Mobile SDKs for Android, JavaScript, and iOS are available with this beta launch. You get a simple to use, fully managed service for creating and maintaining a user directory which can scale to hundreds of millions of users. With this feature, you can easily add sign-up and sign-in functionality to your mobile and web applications. Last month AWS launched the beta version of Amazon Cognito User Pools.
