This repository was archived by the owner on Feb 19, 2022. It is now read-only.

Description
While bootstrapping an Angular app that requires the Google Cloud Endpoints, the library intermittently fails to bootstrap correctly resulting in an undefined window.gapi.auth object.
As per the documentation, GAuth.load or GAuth.checkAuth should be called in the run block to load the OAuth api after which it should be fine to proceed with calls that requires the apis when the promise resolves. This however does not seem to be the case as I have consistently run into intermittent errors where the promise resolves but calls to window.gapi.auth.setToken fail as the auth object is undefined.
This issue has happened in the current version 1.x.x as well as earlier version.s