By: Conan Malone user 29 Mar 2017 at 5:14 a.m. CDT

5 Responses
Conan Malone gravatar
I am having trouble with passport on Gluu. I have configured a google app and have put the clientId and clientSecret in the correct places on Gluu (all with the correct case), I have also enabled the UMA policy and follwed all the other steps in the docs. I now can click on the google button, get redirected to the google login page, after successful login I get asked if I wish to allow Gluu access to my information but then when I click allow I get redirected back to the Gluu login page with the message 'Go Back and Register'. Is there something else I have to do to connect my google account to my Gluu user? Does it require some UMA configuration? If so can anyone point in the right direction.. There doesn't seem to be anything in the passport logs that is useful. Thanks, Conan

By Conan Malone user 29 Mar 2017 at 5:35 a.m. CDT

Conan Malone gravatar
``` {"level":"info","message":"::ffff:127.0.0.1 - - [29/Mar/2017:10:31:29 +0000] \"GET /passport/token HTTP/1.1\" 200 201 \"https://gluu.idp/oxauth/auth/passport/passport-login\" \"Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:51.0) Gecko/20100101 Firefox/51.0\"","timestamp":"2017-03-29T10:31:29.333Z"} {"level":"info","message":"::ffff:127.0.0.1 - - [29/Mar/2017:10:31:29 +0000] \"GET /passport/auth/google/eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJqd3QiOiI2NWI3ODU2ZS0yOGIyLTRjNTYtOWRhMi1kMWVlZmI4ZDEzN2UiLCJpYXQiOjE0OTA3ODM0ODksImV4cCI6MTQ5MDc4NDkyOX0.48Kcxqrh_HXRA6KvCqQQHcI_UbfVGneYcKL0bck4g2g HTTP/1.1\" 302 0 \"https://gluu.idp/oxauth/auth/passport/passport-login\" \"Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:51.0) Gecko/20100101 Firefox/51.0\"","timestamp":"2017-03-29T10:31:29.366Z"} {"level":"error","message":"Unknown Error: {}","timestamp":"2017-03-29T10:31:36.553Z"} {"level":"info","message":"::ffff:127.0.0.1 - - [29/Mar/2017:10:31:36 +0000] \"GET /passport/auth/google/callback?code=4/blBy0mBkB_ne4wnaElXmKZeMYxwEPGaCKVgWNIOVqQU HTTP/1.1\" 302 74 \"https://accounts.google.com/o/oauth2/auth?response_type=code&redirect_uri=https%3A%2F%2Fgluu.idp%2Fpassport%2Fauth%2Fgoogle%2Fcallback&scope=profile%20email&client_id=834718937158-rsmdtlpd3jpp29jp7ydnasdjas9fjd9f.apps.googleusercontent.com\" \"Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:51.0) Gecko/20100101 Firefox/51.0\"","timestamp":"2017-03-29T10:31:36.555Z"} {"level":"info","message":"::ffff:127.0.0.1 - - [29/Mar/2017:10:31:36 +0000] \"GET /passport/login HTTP/1.1\" 302 242 \"https://accounts.google.com/o/oauth2/auth?response_type=code&redirect_uri=https%3A%2F%2Fgluu.idp%2Fpassport%2Fauth%2Fgoogle%2Fcallback&scope=profile%20email&client_id=834718937158-rsmdtlpd3jpp29jp7ydnasdjas9fjd9f.apps.googleusercontent.com\" \"Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:51.0) Gecko/20100101 Firefox/51.0\"","timestamp":"2017-03-29T10:31:36.625Z"} ``` This is the log file

By Aliaksandr Samuseu staff 29 Mar 2017 at 6:08 p.m. CDT

Aliaksandr Samuseu gravatar
Hi, Conan. Which log this excerpt does belong to? Please check both `/opt/gluu/jetty/oxauth/logs/oxauth.log` and `/opt/gluu/jetty/oxauth/logs/oxauth_script.log` for clues. Could you also provide some screenshots made during each steps of the failing flow, including this page with **'Go Back and Register'** message? Could you also provide a link to the very doc page you used to configure Passport in your setup?

By Arvind Tomar staff 31 Mar 2017 at 4:40 a.m. CDT

Arvind Tomar gravatar
Hi, Conan. I tried to create the same issue but it's working for me. Can you please provide the logs from ```/opt/gluu/jetty/oxauth/logs/oxauth.log``` and ```/opt/gluu/jetty/oxauth/logs/oxauth_script.log```? Also if you can record the video from configuration to using passport will be much helpful for getting into the same situation or figure out any problem. Thanks

By Conan Malone user 03 Apr 2017 at 6:16 a.m. CDT

Conan Malone gravatar
The setup documentation I used for the passport service is at https://gluu.org/docs/ce/3.0.1/authn-guide/passport/ and I followed the steps on ```Setup Passport.js with Gluu``` step 1-11. The log file that is giving me that above log snippet that I posted is from ```/opt/gluu/node/passport/server/logs/passport.log```. I have also checked ```/opt/gluu/jetty/oxauth/logs/oxauth.log``` and ```/opt/gluu/jetty/oxauth/logs/oxauth_script.log``` which only produce the following outputs.. ``` 2017-04-03 11:32:51,645 DEBUG [qtp1395089624-166] [org.xdi.oxauth.service.external.ExternalAuthenticationService] (ExternalAuthenticationService.java:337) - Validating acr_values: 'passport' 2017-04-03 11:32:51,645 DEBUG [qtp1395089624-166] [org.xdi.oxauth.service.external.ExternalAuthenticationService] (ExternalAuthenticationService.java:132) - Executing python 'isValidAuthenticationMethod' authenticator method 2017-04-03 11:32:51,646 DEBUG [qtp1395089624-166] [org.xdi.oxauth.service.external.ExternalAuthenticationService] (ExternalAuthenticationService.java:221) - Executing python 'prepareForStep' authenticator method 2017-04-03 11:32:51,647 DEBUG [qtp1395089624-166] [org.xdi.oxauth.service.external.ExternalAuthenticationService] (ExternalAuthenticationService.java:234) - Executing python 'getExtraParametersForStep' authenticator method 2017-04-03 11:32:51,658 DEBUG [qtp1395089624-166] [org.xdi.oxauth.service.ClientService] (ClientService.java:128) - Found 1 entries for client id = @!1C46.38AE.D077.C150!0001!849C.7440!1111!3604.ECCE 2017-04-03 11:32:51,659 DEBUG [qtp1395089624-166] [org.xdi.oxauth.service.ClientService] (ClientService.java:128) - Found 1 entries for client id = @!1C46.38AE.D077.C150!0001!849C.7440!1111!3604.ECCE 2017-04-03 11:32:51,660 DEBUG [qtp1395089624-166] [org.xdi.oxauth.service.ClientService] (ClientService.java:128) - Found 1 entries for client id = @!1C46.38AE.D077.C150!0001!849C.7440!1111!3604.ECCE 2017-04-03 11:32:51,661 DEBUG [qtp1395089624-166] [org.xdi.oxauth.service.ClientService] (ClientService.java:128) - Found 1 entries for client id = @!1C46.38AE.D077.C150!0001!849C.7440!1111!3604.ECCE 2017-04-03 11:32:51,661 DEBUG [qtp1395089624-166] [org.xdi.oxauth.service.ClientService] (ClientService.java:128) - Found 1 entries for client id = @!1C46.38AE.D077.C150!0001!849C.7440!1111!3604.ECCE 2017-04-03 11:32:51,662 DEBUG [qtp1395089624-166] [org.xdi.oxauth.service.ClientService] (ClientService.java:128) - Found 1 entries for client id = @!1C46.38AE.D077.C150!0001!849C.7440!1111!3604.ECCE 2017-04-03 11:32:51,665 DEBUG [qtp1395089624-166] [org.xdi.oxauth.service.ClientService] (ClientService.java:128) - Found 1 entries for client id = @!1C46.38AE.D077.C150!0001!849C.7440!1111!3604.ECCE 2017-04-03 11:32:51,666 DEBUG [qtp1395089624-166] [org.xdi.oxauth.service.ClientService] (ClientService.java:128) - Found 1 entries for client id = @!1C46.38AE.D077.C150!0001!849C.7440!1111!3604.ECCE ``` and ``` 2017-04-03 11:33:46,302 INFO [qtp1395089624-156] [org.xdi.service.PythonService$PythonLoggerOutputStream] (PythonService.java:219) - Passport: Basic. Prepare for Step 1 method call ``` Ill attach a screenshot of the screen that tells me to go back and register after I have clicked the 'Allow' button on Googles side. When following the network trace it would appear I get the code from google ```https://gluu.idp/passport/auth/google/callback?code=4/mOzWp7qMVVwyFllKsPMB5jXktsB8Q0915zPAY51zV9s#``` but then I get redirected to this following URL ```https://gluu.idp/oxauth/auth/passport/passportlogin.htm?failure=Go back and register!```

By Arvind Tomar staff 13 Apr 2017 at 2:06 a.m. CDT

Arvind Tomar gravatar
Hi Conan, I have checked the logs and nothing seems to be wrong in logs. I tried again to configure passport with gluu 3.0.1 in centos 7.2 and it's working. Can you please record a video from configuration to using of passport and getting the error? The video will be much helpful for getting into the same situation or reproducing the issue on our side. Thanks