This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import jwa from 'jwa' | |
import AWS from 'aws-sdk' | |
import { v4 as uuidv4 } from 'uuid' | |
import { parse as parseQuery } from 'querystring' | |
const ecdsa = jwa('ES256') | |
interface KeyStore { | |
public: Record<string, string> | |
private: Record<string, string> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const cryptoRandomString = require('crypto-random-string') | |
const ses = new (require('aws-sdk').SES)() | |
const sendEmail = async (emailAddress, secretLoginCode) => { | |
const params = { | |
Destination: { ToAddresses: [emailAddress] }, | |
Message: { | |
Body: { | |
Html: { |