Is there a way to use Google's Javascript client login without a pop up?

可紊 提交于 2019-12-11 13:47:15

问题


I'm using Google's client login in my client-side javascript, which causes a popup to appear for auth and google login. However, I'd love to configure the sign-in to redirect to the popup's url, auth the user, then come back to my site instead.

I can't find anything in the documentation about configuring pop up vs redirect: https://developers.google.com/identity/sign-in/web/reference but I wanted to see if anyone else had success configuring the client-side login for this.

The alternative is using backend auth which I know allows redirects.


回答1:


The JavaScript library requires a window to pop up. If you want to implement it by redirecting users to auth, it will be a server side implementation like @osmanraifgunes pointed out in the comment.



来源:https://stackoverflow.com/questions/36648165/is-there-a-way-to-use-googles-javascript-client-login-without-a-pop-up

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