Last active
September 19, 2017 19:59
-
-
Save mattkelley/53a14b6a8c22b5a6cdb877ef44bf4796 to your computer and use it in GitHub Desktop.
Mock Admin Console API invalid JWT example
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
// 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