By: Noelle Keller user 01 Oct 2015 at 9:59 a.m. CDT

10 Responses
Noelle Keller gravatar
Hello, I have the gplus script enables and it works great on Chrome and Firefox but on Internet Explorer. It pulls up the login screen, users can type Google credentials but it never redirects from the login page saying the Federation service is live. When the user clicks again the Google Plus button the pop-up opens and immediately disappears. I am not seeing any log errors either. Has anyone experienced this issue?

By Noelle Keller user 01 Oct 2015 at 10:15 a.m. CDT

Noelle Keller gravatar
IN the IE debugger SCRIPT1028: Expected identifier, string or number File: gplus-login, Line: 169, Column: 6 Callback function named "onSignInCallback" not found

By Michael Schwartz Account Admin 01 Oct 2015 at 10:35 a.m. CDT

Michael Schwartz gravatar
In gpluslogin.xhtml I see the javascript is define in line 142. Perhaps if you move this to the top, it will find it?

By Noelle Keller user 01 Oct 2015 at 10:41 a.m. CDT

Noelle Keller gravatar
Can you be more specific, I don't see a define on that line. This is the new URL we are using https://wyo-sm.wyoming.gov/

By Michael Schwartz Account Admin 01 Oct 2015 at 10:46 a.m. CDT

Michael Schwartz gravatar
After you ssh to the server and do `# service gluu-server login` you can edit the file in /opt/tomcat/webapps/oxauth/auth/gplus/gpluslogin.xhtml

By Noelle Keller user 01 Oct 2015 at 1:17 p.m. CDT

Noelle Keller gravatar
This is what I see on line 142 <s:div rendered='#{!empty client.getTosUri()}'> <p> <h:outputText value="#{messages['common.pleaseReadTheTos']}" /> <a target="_blank" href='#{client.getTosUri()}'> <h:outputText value="#{messages['common.termsOfService']}" /> </a> </p>

By Michael Schwartz Account Admin 01 Oct 2015 at 1:23 p.m. CDT

Michael Schwartz gravatar
Sory, 148. Here is the [link](https://github.com/GluuFederation/oxAuth/blob/master/Server/src/main/webapp/auth/gplus/gpluslogin.xhtml#L148) on github. Basically move the javascript to the beginning: <script type="text/javascript"> //<![CDATA[ var helper = (function() { var authResult = undefined; return { /** * Hides the sign-in button and connects the server-side app after * the user successfully signs in. * * @param {Object} authResult An Object which contains the access token and * other authentication information. */ onSignInCallback: function(authResult) { // for (var field in authResult) { // console.log('Auth result field: ' + field + ': ' + authResult[field]); // } if (authResult['access_token']) { // The user is signed in this.authResult = authResult; $('#gConnect').hide(); helper.connectServer(); } else if (authResult['error']) { // There was an error, which means the user is not signed in. // As an example, you can troubleshoot by writing to the console: console.log('There was an error: ' + authResult['error']); $('#gConnect').show(); } }, /** * Submit login form with tokens to server * For more information, see: * https://developers.google.com/+/web/signin/server-side-flow */ connectServer: function() { $("input[name='gplus_auth_code']").val(this.authResult["code"]); $(":input:submit[id='loginForm:loginButton']").click(); }, }; })(); /** * Calls the helper method that handles the authentication flow. * * @param {Object} authResult An Object which contains the access token and * other authentication information. */ function onSignInCallback(authResult) { helper.onSignInCallback(authResult); } //]]> </script>

By Noelle Keller user 01 Oct 2015 at 2:05 p.m. CDT

Noelle Keller gravatar
OK I moved it to line 12, but still same error. It didn't do this on the test system we built. Should I rebuild this in out production environment. Expected identifier, string or number Callback function named "onSignInCallback" not found

By Michael Schwartz Account Admin 01 Oct 2015 at 2:51 p.m. CDT

Michael Schwartz gravatar
I see a [change from 16 days ago](https://github.com/GluuFederation/oxAuth/commit/68a0ff564e536d69e1c64f36283a22a73170e45c#diff-65c56b2eea8966978696865d38470ef8) to this script. But it looks like it was just fixing a typo. I bet if you put a contract out on Upwork, you could find someone to fix it pretty inexpensively and quickly. If I put this in the queue for testing at Gluu, as a Community Support request, it won't make it to the developers until late next week or the week after that.

By Noelle Keller user 01 Oct 2015 at 5:18 p.m. CDT

Noelle Keller gravatar
I added this meta tag below to gpluslogin and now it it is working in Internet Exploder. Thanks for you help Mike. <meta http-equiv="X-UA-Compatible" content="IE=edge" />

By Michael Schwartz Account Admin 02 Oct 2015 at 12:24 a.m. CDT

Michael Schwartz gravatar
Nice work! You contributed to open source! I added this to [github](https://github.com/GluuFederation/oxAuth/commit/e1198ff9e533be03ed87dda88adcef9e1816ce7c#diff-65c56b2eea8966978696865d38470ef8)