Skip to content

Instantly share code, notes, and snippets.

@mattkelley
Last active September 19, 2017 19:59
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mattkelley/53a14b6a8c22b5a6cdb877ef44bf4796 to your computer and use it in GitHub Desktop.
Save mattkelley/53a14b6a8c22b5a6cdb877ef44bf4796 to your computer and use it in GitHub Desktop.
Mock Admin Console API invalid JWT example
// Create a multi-part form
const data = new FormData()
// Set error type
data.append('error', 'expired')
// Fetch the invalid JWT
fetch(`${window.location.origin}/home/jwt`, { method: 'POST', body: data })
.then(body => body.json())
.then(jwt => console.log(jwt))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment