Skip to content

Instantly share code, notes, and snippets.

@ygotthilf
ygotthilf / jwtRS256.sh
Last active March 25, 2024 09:12
How to generate JWT RS256 key
ssh-keygen -t rsa -b 4096 -m PEM -f jwtRS256.key
# Don't add passphrase
openssl rsa -in jwtRS256.key -pubout -outform PEM -out jwtRS256.key.pub
cat jwtRS256.key
cat jwtRS256.key.pub
@charltoons
charltoons / autoconfirm.js
Created August 26, 2017 14:21
AWS Cognito Lambda PreSignup Auto-Confirm Trigger
'use strict';
exports.handler = (event, context, callback) => {
console.log('Received event:', JSON.stringify(event, null, 2))
const modifiedEvent = event
// check that we're acting on the right trigger
if (event.triggerSource === "PreSignUp_SignUp"){
// auto confirm the user