Skip to content

Commit

Permalink
Remove response logs when no error
Browse files Browse the repository at this point in the history
  • Loading branch information
kam193 committed Apr 28, 2021
1 parent 337dae1 commit 9675e58
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions signature-extension/api.js
Original file line number Diff line number Diff line change
Expand Up @@ -80,9 +80,9 @@ function getUserData(accessToken, expectedEmail) {
reject(ERROR);
}
response.json().then((json) => {
console.log(json);
if (json.aud && json.aud === getOauthClientId()) {
if (expectedEmail && json.email !== expectedEmail) {
console.log(json)
reject(ERROR);
}
resolve({ ...json });
Expand All @@ -98,7 +98,6 @@ function getUserData(accessToken, expectedEmail) {

function connectWithGoogle() {
const handleResponse = (redirectUrl) => {
console.log(redirectUrl);
const code = extractCode(redirectUrl);
if (!code) {
console.log(redirectUrl);
Expand All @@ -121,7 +120,6 @@ function connectWithGoogle() {
reject(ERROR);
}
response.json().then((json) => {
console.log(json);
getUserData(json.access_token).then((userData) => resolve({ ...json, ...userData }));
});
});
Expand Down

0 comments on commit 9675e58

Please sign in to comment.