Skip to content

Commit

Permalink
Merge 894bb77 into 7190352
Browse files Browse the repository at this point in the history
  • Loading branch information
huangjoyce3 committed Sep 10, 2019
2 parents 7190352 + 894bb77 commit 2e288f3
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion sample/public/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -55,11 +55,12 @@
document.getElementById('login').addEventListener('click', async () => {
document.getElementById('login').setAttribute('class', 'hidden');
document.getElementById('error').textContent = '';

try {
const tokens = await appID.signinWithPopup();
let userInfo = await appID.getUserInfo(tokens.accessToken);
let decodeIDToken = tokens.idTokenPayload;
document.getElementById('welcome').innerHTML = 'Hello, ' + decodeIDToken.name;
document.getElementById('welcome').textContent = 'Hello, ' + decodeIDToken.name;
document.getElementById('id_token').textContent = JSON.stringify(decodeIDToken);
document.getElementById('user_info').textContent = JSON.stringify(userInfo);
} catch (e) {
Expand Down

0 comments on commit 2e288f3

Please sign in to comment.