Skip to content

Instantly share code, notes, and snippets.

@bradennapier
bradennapier / validateCognito.js
Last active August 27, 2019 08:43
Just a rough sketch for validating cognito tokens
/* @flow */
import axios from 'axios';
import jose from 'node-jose';
import day from 'dayjs';
const AWS_REGION = '<AWS_REGION>';
const AWS_POOL_ID = '<POOL_ID>';
const AWS_APP_CLIENT_ID = '<APP_CLIENT_ID>';
const AWS_TOKEN_PUBLIC_KEYS_URL =
`https://cognito-idp.${AWS_REGION}.amazonaws.com/${AWS_POOL_ID}/.well-known/jwks.json`;
@dahlsailrunner
dahlsailrunner / SSL-nginx-Docker.md
Last active October 2, 2025 18:24
SSL with Docker images using nginx as reverse proxy

Docker with SSL and an nginx reverse proxy

Running your ASP.NET Core (or other) application in Docker using SSL should not be an overwhelming task. These steps should do the trick.

Run the following steps from a Linux terminal (I used WSL or WSL2 on Windows from the Windows Terminal).

1. Create a conf file with information about the cert you'll be creating

It should look something like the content below; call it my-site.conf or something like that.