Created
December 10, 2019 13:34
-
-
Save jackrobertscott/c0c998cfcde7ef989346ac1737749149 to your computer and use it in GitHub Desktop.
This file contains hidden or 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 * as queryString from 'query-string'; | |
const urlParams = queryString.parse(window.location.search); | |
if (urlParams.error) { | |
console.log(`An error occurred: ${urlParams.error}`); | |
} else { | |
console.log(`The code is: ${urlParams.code}`); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment