Skip to content

A small code experiment... Grown into a sample app... on establishing a user in an AWS Identity Pool using Developer Authenticated Identities (custom SSO login) to access AWS services, such as Lambda functions.

Notifications You must be signed in to change notification settings

jbachelor/DevAuthIdentitiesWithAwsCognitoInXamForms

Repository files navigation

Developer Authenticated Identities, AWS Cognito, AWS Lambda, and Xamarin.Forms

A small code experiment... Grown into a sample app (using Prism... which I love dearly)... on establishing a user in an AWS Identity Pool using Developer Authenticated Identities (custom SSO login) in order to access other AWS services (e.g., AWS Lambda functions) with authenticated users.

Special thanks!

I'd like to profusely thank kneekey23, steveataws, nikhil-dabhade, and sunchunqiang for their help and advice as I struggled through learning how to implement this functionality. Thank you for your time, knowledge, effort, and assistance! I am in your debt!

Purpose of this code

Users of this app login to a company's custom SSO server (a total fake in this app, but BOY is it fast!), and the app receives a unique id (the GuidId property you see in the code of the coolAppSsoUser object).

The idea is that the user would log in with the custom SSO provider, and behind the scenes we are now trying to either create a new or get an existing Amazon Cognito Identity from an Identity Pool, using the data received from the SSO server (in particular, the user's unique id).

We then move on to getting credentials for our Cognito user, and from there the user is able to trigger a Lambda functions.

Notes to get this running on your machine

There is a class called AwsConstants.cs... All of the required constants you will need are listed there, and I tried to make the names as clear as I could. You'll need to fill in values from your own account.

Where does this code come from?

Following the steps outlined in the AWS documentation, specifically under the heading Developer Authenticated Identities Authflow, then the sub-heading Enhanced Authflow. Please see the Resources section below for more articles/videos that may be helpful in understanding this app and the problems it is trying to solve.


Screenshot of the aws suggested auth flow for developer authenticated identities


Resources

About

A small code experiment... Grown into a sample app... on establishing a user in an AWS Identity Pool using Developer Authenticated Identities (custom SSO login) to access AWS services, such as Lambda functions.

Topics

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages