•  · 22 friends

Chat+ Oauth Login Issues

I have only installed Chat+ a couple of times and it seems my hardest issue is getting the oauth to work.  I thought I had it figured out but this recent install again has me facing issues.  Chat+ is up and running and I can log in using the login form.  However, oauth is not working.  I have generated the key and secret and filled in the oauth information in the oauth form in Chat+.  I saved and then restarted the chat server.  The oauth button appears but when I try to log in a user I get the, use my profile creds message, click yes, then after a few seconds the login appears again and the user is not logged into chat.  Looking at the logs I see:

Exception while invoking method 'login' SyntaxError: Unexpected end of input   at Object.parse (native)   at CustomOAuth.getAccessToken (/opt/chat+/programs/server/packages/rocketchat_custom-oauth.js:166:17)   at Object.handleOauthRequest (/opt/chat+/programs/server/packages/rocketchat_custom-oauth.js:224:28)   at OAuth._requestHandlers.(anonymous function) (packages/oauth2.js:27:31)   at middleware (packages/oauth.js:203:5)   at packages/oauth.js:176:5 

Any advice would be very appreciative.

  • 57
Replies (15)
  • Additional information.  Sever is CentOS 7 and Nginx is running as a proxy to Apache.

    • Hello, someone seems to have had the same problem here: https://github.com/RocketChat/Rocket.Chat/issues/8492 


      • Hello, someone seems to have had the same problem here: https://github.com/RocketChat/Rocket.Chat/issues/8492 


        No, they did not have the same problem.  Please go to that github message and look carefuly at the error they reported and compare it to the error I reported; it is a different error than what I am seeing and therefore, not the same problem

        • I did see a developer answering questions so I know at least one have been in today.  However, I guess he knew nothing about Chat+ and oauth so I guess the developers here can't help me.

          I have twisted the settings every which way possible and no luck, still getting

           Exception while invoking method 'login' SyntaxError: Unexpected end of input   at Object.parse (native)   at CustomOAuth.getAccessToken (/opt/chat+/programs/server/packages/rocketchat_custom-oauth.js:166:17)   at Object.handleOauthRequest (/opt/chat+/programs/server/packages/rocketchat_custom-oauth.js:224:28)   at OAuth._requestHandlers.(anonymous function) (packages/oauth2.js:27:31)   at middleware (packages/oauth.js:203:5)   at packages/oauth.js:176:5

          Are there new instructions for Chat+?  Have changes been made but no updates in the instructions?

          Of course visiting RocketChat is no help; their instructions are as bad as the ones from Boonex.

          • I have also issues with chat plus but una team are not cares about it since they develop messenger.  never the less the chat plus version is as old af 

            I am waiting for answer if I can use latest rocket chat version from github and connect it to una like chat plus with all his benefits

            • I have also issues with chat plus but una team are not cares about it since they develop messenger.  never the less the chat plus version is as old af 

              I am waiting for answer if I can use latest rocket chat version from github and connect it to una like chat plus with all his benefits

              You might have to write your own oauth; you could probably use UNA as a base.  There is some information on this at RocketChat.

              • I used una auth module and put it in chat plus. this is una instructions

                • I am waiting for answer if I can use latest rocket chat version from github and connect it to una like chat plus with all his benefits


                  That's exactly what I use.

                  https://rocket.chat/docs/installation/manual-installation/ubuntu/snaps/ 

                  This makes my life much easier!

                  The OAuth works. Some things are missing from Alexs compiled version.

                  • Dolphin, UNA it all is the same in administration.

                    My version does not have the "UNA" section so I use the Dolphin link.


                    • Thanks for coming in Michael.  So your RocketChat will connect with the UNA oauth using the settings under the Dolphin oauth in RocketChat?  Maybe I don't really understand how the aouth between RocketChat and UNA works.  To be honest, yes, I am helping someone set up Dolphin 7.3.5 with Chat+ on a new server before they attempt to migrate sites to UNA.  They want to get their old site up and running first on a new server then we are going to test the migration of the sites to UNA.  I dropped Nginx as a reverse proxy in case it was interfering with the oauth handshakes but it wasn't.  I didn't use their old Chat bundle but downloaded fresh from boonex.  I am wondering if some changes were made that is now incompatible with the old Dolphin oauth module.  However, perhaps I could just use RocketChat with some guidance.  The version I downloaded from boonex does have the UNA oauth section but I am guessing that you mean your RocketChat does not have the UNA oauth section.

                      • Dolphin, UNA it all is the same in administration.

                        My version does not have the "UNA" section so I use the Dolphin link.


                        On your screenshot; what does login type mean?

                          • A snap is a bundle of an app and its dependencies that works without modification across many different Linux distributions.  Looking at RocketChat, there only appears to be a snap app for RC for Ubuntu.  The snap is like an auto installer thing so that you don't have to do all the work.  You should be able to do a manual install of RC and still use the UNA oauth connector if I am reading what Michael said correctly.  He also stated he was using the Dolphin oauth that is in RC; I don't know if the current RC has an ouath for UNA or not.

                            For me, I think it would be nice if the person that did the compile of Chat+ would come in and shed some light on the error I was getting but then Boonex has always been this way even over at boonex dot com.  The whole corporate attitude of Boonex has always been lacking.  Take the support issues of their servers; it appears that it takes public shaming in the forums before Boonex will step in.  Of course Andrew himself admitted that it is only the "Big Players" they care about.

                            • So your RocketChat will connect with the UNA oauth using the settings under the Dolphin oauth in RocketChat?  *********************************.  The version I downloaded from boonex does have the UNA oauth section but I am guessing that you mean your RocketChat does not have the UNA oauth section.

                              Yes it does.

                              My version does not have the UNA section in the admin.

                              I cannot use the avatars from the site, they have to manually add one or just not use them at all. The chat section is just for help, not for any social activity so I found no need for them. 

                              • Dolphin, UNA it all is the same in administration.

                                My version does not have the "UNA" section so I use the Dolphin link.

                                On your screenshot; what does login type mean?

                                You have that option for the member to see a pop-up window to log into the main site.

                                The other option is a redirect to a new page for the members to log into the main site.

                                image_transcoder.php?o=bx_froala_image&h=2304&dpx=1&t=1570812044

                                8
                                4
                                1
                                3
                                Added:
                                Category: