Ionic AWS Cognito S3 Authenticaion
An Ionic Authentication App using AWS Cognito and S3. Persists the user session and incorporates a 'WhatsApp' inspired phone number mask and validation component.
Mobile Ionic Authenticaton App using AWS Cognito (iCognito). Persists the user session and incorporates a 'WhatsApp' inspired phone number mask and validation component.
Mobile Ionic Authenticaton App using AWS Cognito (iCognito)
- Welcome Page
- Login Page
- Show Hide Password Component
- Forgot Password Page
- Sign Up Page
- Phone Number Component
- Home Page - List of Cognito Profile Attributes
- Edit Profile Page
- Change Password Page
- Sign Out
- Stores the App User session if the app is closed until user Signs out### Quicklinks
- AWS Console
AWS Services used:
- Amazon Cognito User Pools
- Amazon Cognito Federated Identities
- Amazon S3
Included Ionic Marketplace Starter by Ntegral
- Create or Sign In to your AWS Cognito environment
- Create an AWS Cognito User Pool
- Create an AWS Federated Identity Pool
- Edit the AWS Federated Identity Pool, adding the AWS Cognito User Pool created in step 2(above).
- Add an App Client to the AWS Cognito User Pool created in step 2(above). Note: Make sure to uncheck the checkbox "Generate client secret".
- Create two custom attributes. country_code and member_since.
Ionic app setup
- Clone this repo:
- Open the congito.config.ts file; Add the informaion for the following:
- region: 'your-region',
- userPoolId: 'your-region_1gfVMWz3c',
- appId: 'your-app-id',
- idpUrl: 'cognito-idp.your-region.amazonaws.com',
- identityPoolId: 'your-region:guid-of-the-identityPool'
- Open a bash shell and navigate to the project folder.
- Then run.
$ sudo npm install
Then, to run it, and run:
$ ionic cordova platform add ios
$ ionic cordova run ios
Substitute ios for android if not on a Mac. Note: you can also substitute ios for browser if you want to run the application in a browser:
$ ionic cordova run browser