I have a mobile site which lists jobs, the user applies and uploads their CV (resume) - I want them to be able to choose a file from their Google Drive.
I\'ve create
To solve your issue you need to understand how google performs oauth in your case:
Why browser blocks the popup in 2nd step:
window.event
is destroyed).So if user didn't block a popup and you popup is still blocked, gapi actions look something like:
function auth() {
setTimeout(function() {
// by this time window.event is destroyed, that's why browser blocks the popup
window.open(document.URL, '_blank', 'location=yes,height=570,width=520,scrollbars=yes,status=yes');
}, 100)
}
So what you should do:
window.event
won't be null. So move all gapi init methods to DOMContentLoaded
.