- The Segment libraries (“ Sources ”) generate messages about what’s happening in a web or native app, and send them to the Segment servers
- Segment then translates the content of those messages into different formats for use by other tools (which we call ‘ Destinations ’), and sends the translated messages to those tools.
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
[ | |
{ | |
"name": "Afghanistan ", | |
"code": "+93" | |
}, | |
{ | |
"name": "Albania ", | |
"code": "+355" | |
}, | |
{ |
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 dependencies | |
const jwt = require('jsonwebtoken'); | |
const jwkToPem = require('jwk-to-pem'); | |
// Example data from https://cognito-idp.<REGION>.amazonaws.com/<POOL-ID>/.well-known/jwks.json | |
const body = { | |
"keys": [ | |
{ | |
"alg": "RS256", | |
"e": "AQAB", |