Last active
June 22, 2022 20:51
-
-
Save bluejack/21ffc874ba9c00fea9cc66cab0b6fad1 to your computer and use it in GitHub Desktop.
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
async function on_response(response) { | |
if (response && response.credential) { | |
const rawdata = jwt_decode(response.credential); | |
const user = (({ email, family_name, given_name, picture, name }) => ({ email, family_name, given_name, picture, name}))(rawdata); | |
window.localStorage.setItem('gothic-id', 'loaded'); | |
} | |
// leverage user object or move on to next step. | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment