Skip to content

Commit

Permalink
Update index.html
Browse files Browse the repository at this point in the history
  • Loading branch information
momentollogy committed Apr 13, 2023
1 parent 97a3d93 commit b74eb14
Showing 1 changed file with 15 additions and 13 deletions.
28 changes: 15 additions & 13 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -154,22 +154,24 @@ <h1>Arduino Piano Buzzer Song Creator V1 <br> <small>by momentollogy</small><br>
});
}


function initClient(token) {
gapi.client.init({
apiKey: 'AIzaSyA90ftyrgjmJPfzKeXYypzBdO9IJlbHU78',
clientId: '303614643987-2au0ltghltd0u2vk7g36t3ofmtf63vos.apps.googleusercontent.com',
discoveryDocs: ['https://sheets.googleapis.com/$discovery/rest?version=v4'],
scope: 'https://www.googleapis.com/auth/spreadsheets',
idToken: token,
}).then(() => {
console.log('Client initialized.');
// Call functions that require authenticated access to the API here
}, error => {
console.error('Error initializing client:', error);
async function initClient(token) {
await gapi.load('client:auth2', async () => {
try {
await gapi.client.init({
apiKey: 'AIzaSyA90ftyrgjmJPfzKeXYypzBdO9IJlbHU78',
clientId: '303614643987-2au0ltghltd0u2vk7g36t3ofmtf63vos.apps.googleusercontent.com',
discoveryDocs: ['https://sheets.googleapis.com/$discovery/rest?version=v4'],
scope: 'https://www.googleapis.com/auth/spreadsheets',
idToken: token,
});
console.log('Client initialized.');
} catch (error) {
console.error('Error initializing client:', error);
}
});
}


function handleSignInFailure(error) {
console.error('Error during sign-in:', error);
}
Expand Down

0 comments on commit b74eb14

Please sign in to comment.