Java 谷歌认证(弹出窗口)

Java 谷歌认证(弹出窗口),java,javascript,authentication,jsf,Java,Javascript,Authentication,Jsf,我自己做了一个弹出窗口来验证google帐户。问题是,当我登录到任何谷歌帐户时,它会关闭弹出窗口,并且不会刷新包含打开弹出窗口链接的网页。是否已经实施了有效的解决方案?或者我真的需要自己实现一个 如果有其他方法,请告诉我。我有点绝望 打开弹出窗口: <a href="#{request.contextPath}/home/convite/conviteGmail.jsf" onclick="showPopup(this.href);return(false);" >Gmail<

我自己做了一个弹出窗口来验证google帐户。问题是,当我登录到任何谷歌帐户时,它会关闭弹出窗口,并且不会刷新包含打开弹出窗口链接的网页。是否已经实施了有效的解决方案?或者我真的需要自己实现一个

如果有其他方法,请告诉我。我有点绝望

打开弹出窗口:

<a href="#{request.contextPath}/home/convite/conviteGmail.jsf" onclick="showPopup(this.href);return(false);" >Gmail</a>
<a4j:commandLink action="#{conviteGmailBean.logarGmail}" oncomplete="javascript:window.close()"  rendered="#{!conviteGmailBean.autenticado}" value="Login" reRender="convidarAmigosForm" />
弹出窗口本身:

<h:outputLabel for="login" styleClass="email_convite">Login: </h:outputLabel>
                <h:inputText id="login" value="#{conviteGmailBean.login}" />
            </div>
            <br/>
            <div>
                <h:outputLabel for="password" styleClass="email_convite">Password: </h:outputLabel>
                <h:inputSecret id="password" value="#{conviteGmailBean.password}" />
            </div>
                <h:outputText value="#{conviteGmailBean.mensagemErro}" rendered="#{conviteGmailBean.erro}"/>
关闭弹出窗口:

<a href="#{request.contextPath}/home/convite/conviteGmail.jsf" onclick="showPopup(this.href);return(false);" >Gmail</a>
<a4j:commandLink action="#{conviteGmailBean.logarGmail}" oncomplete="javascript:window.close()"  rendered="#{!conviteGmailBean.autenticado}" value="Login" reRender="convidarAmigosForm" />

我已将结束弹出部分更改为:

<a4j:commandLink action="#{conviteGmailBean.logarGmail}" oncomplete="javascript:window.opener.parent.document.location.href='#{request.contextPath}/home/convite/convite.jsf';javascript:window.close()" rendered="#{!conviteGmailBean.autenticado}" value="Login" reRender="convidarAmigosForm" />
资料来源: