简体   繁体   中英

Using Google OAuth 2.0 for Client-side Authentication not working

I am using google API for my calendar. It worked perfectly last days but now its showing some errors in my browser console

Failed to load resource: the server responded with a status of 404 ()
https://apis.google.com/_/scs/apps-static/_/js/k=oz.gapi.en.JpdoJPJ5hQs.O/m=client/rt=j/sv=1/d=1/ed=1/am=AQ/rs=AGLTcCMrDhGj8PwnRZ6lDn8FgkiuwDfUVw/t=zcms/cb=gapi.loaded_0

I am sure that there are no changes in my code. What happens to my app? Please help me!

After several hours to research, I realize that everything is in client.js file. When I build this app, instead of using this code <script src="https://apis.google.com/js/client.js?onload=checkAuth"></script> for get code from Google directly, I downloaded it and saved on local. The problem is that this code will be updated by Google automatically, so we must update it too.

In summary:

Cause: source code was change by Google

Solution: update source code on local or use

<script src="https://apis.google.com/js/client.js?onload=checkAuth"></script>

Ps: sorry for my bad English :D

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM