How does Google Plus Oauth callback function work?

风格不统一 提交于 2019-12-12 03:22:12

问题


In Google+ JS documentation, it says that if a callback function parameter is specified, Google will call that function when auth flow completes.

How would that work? i.e. how does javascript in parent window get access child window (Google Oauth)'s state?


回答1:


Javascript children windows can call functions in their parent windows. Let's say you specify the function signinCallback(authResult), then the auth window can call parent.signinCallback(authResult) to pass authResult to your main window.



来源:https://stackoverflow.com/questions/27934815/how-does-google-plus-oauth-callback-function-work

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!