Category: Cognito
-
Get User Id in Lambda node.js
Hi everyone, A quick post on where to find the user id (sub) in a lambda requested that has been authenticated with a congito authorizer. You’ll be able to find everything you need in the event object under requestContext > authorizer > claims:
-
Cognito Auth with AWS SAM
Hi everyone, I’ve spent today implementing Cognito with AWS SAM and it took quite a while to work out what needed to be done – unfortunately there’s a lot of conflicting doco out there. Posting a sample template just in case it’s able to help anyone else out. The first thing to do is to…
-
Parsing Hash Args for Cognito Auth – Javascript
Hi everyone, A quick post on a function for parsing hash args when using AWS Congito. //jsfiddle.net/4eo7836j/embed/ Just in case the fiddle ever disappears: const parseHashArgs = aURL => { aURL = aURL || window.location.href; var vars = {}; var hashes = aURL.slice(aURL.indexOf(‘#’) + 1).split(‘&’); for (var i = 0; i 1) { vars[hash[0]] =…