Forums  ›  General  ›  General discussions
 

oauth headers rocket.chat

I will make it a priority after the final beta is released which is in a few days. I have been spending the last several days trying to streamline my development process because my current method is to slow.

It's really not a matter of funding, but a matter of time. Which right now is not a problem because i am currently unemployed and my unemployment compensation is paying my expenses. So funding is not a issue at the moment.

It all boils down to time. Any funding i get would need to replace my current monthly pay because quitting my job is the only way to obtain extra time. I can't buy extra time.

So basically no single person is going to be able to provide enough to replace my current pay, and it will take time for this project to begin earning enough to do that as well.

I am hoping the restaurant i work at will remain closed for a few more months. At least until my unemployment runs out.

No, same issue.  On the Rocket.Chat side in the logs I get unexpect end of json input.

A few months back I had the same issue with a site I moved to a new server; they wanted off of Boonex Zarconia.  The Chat+ wouldn't work as far as the oauth.  I tried everything to get it to work; worked on it for a month.  I tried Chat+ and then Rocket.Chat.  I finally gave up.  Then the owner asked me to try once more.  I ripped everything out, started over with Chat+ and it worked; the oauth connection worked.  I have no idea why.  I have no idea if it is still working or not.

I am sick of Rocket.Chat.  What if I get it working and then bam; one day it isn't working and I can't get it back up.  With paying members they get upset; demand refunds, etc.  I am going to pull it out.  Members don't want to jump through hoops, registering on your site and then having to register on the chat; they want a one click and use solution.  Even Boonex is not pushing Rocket.Chat for UNA.  They decided to go to Jitsi Meet in the cloud; although supposedly one could host their on Jitsi server and not do it in the cloud.

Video chat is a major part of the site I am building; so I need to find a solution.  Deano, how much would you need in funds to build a video chat solution for Dolphin/Cheetah?

The other part is a one to many streaming; based around the concept of YouTube.  I connect my phone to YouTube and start a stream.  People don't connect to my phone, they connect to YouTube and YouTube's server streams the video to everyone that is watching the stream.  My data usage on my phone is just me sending the data to YouTube.  Video conferencing.  Jitsi has video conferencing if I understand correctly.  I may play with Jitsi but I need to be able to do an oauth single click logon for my members.

Thanks Deano for your help but I think I may step away from Rocket.Chat for a bit before I go insane.

It's possible. The version of rocket chat on your site seems to be encoding the redirect_uri where the one on the boonex site is not.

So it's possible the oauth module is not decoding the redirect_uri because it's not expecting it to be encoded.


You could try to decode it.

In BxOAuthModule in the function actionAuth look for this.

 

        if (!isLogged()) {
            $_REQUEST['relocate'] = BX_DOL_URL_ROOT . $this->_oConfig->getBaseUri() . 'auth/?client_id=' . bx_get('client_id') . '&response_type=' . bx_get('response_type') . '&state=' . bx_get('state') . '&redirect_uri=' . bx_get('redirect_uri');
            login_form('', 0, false, 'disable_external_auth no_join_text');
            return;
        }

 

And replace with this.

 

        if (!isLogged()) {
            $_REQUEST['relocate'] = BX_DOL_URL_ROOT . $this->_oConfig->getBaseUri() . 'auth/?client_id=' . bx_get('client_id') . '&response_type=' . bx_get('response_type') . '&state=' . bx_get('state') . '&redirect_uri=' . urldecode(bx_get('redirect_uri'));
            login_form('', 0, false, 'disable_external_auth no_join_text');
            return;
        }

I noticed when using the headers plugin for FireFox that I got a slightly different URL for my site and the Dolphin demo site when connecting.  Could the ascii code be causing an issue?

 

https://domain.tld//m/oauth2/auth/?client_id=bvvs9rjadb&redirect_uri=https%3A%2F%2Fchat.domain.tld%2F_oauth%2Fdolphin&response_type=code&state=eyJsb2dpblN0eWxlIjoicmVkaXJlY3QiLCJjcmVkZW50aWFsVG9rZW4iOiJNTklKMTRGdlVYUE90Yk9rbksyZVNwcnRfY3JSTWhIV3hNdFJVUVdUeDdyIiwiaXNDb3Jkb3ZhIjpmYWxzZSwicmVkaXJlY3RVcmwiOiJodHRwczovL2NoYXQuYmV0YW11c29jaWV0eS5jb20vaG9tZSJ9&scope=basic

 

http://demo.boonex.com//m/oauth2/auth/?client_id=39h4pbv3xs&redirect_uri=https://demo-chat.boonex.com/_oauth/dolphin&response_type=code&state=eyJsb2dpblN0eWxlIjoicmVkaXJlY3QiLCJjcmVkZW50aWFsVG9rZW4iOiJ2SUtDYWN5UmY0NkpXVk1Yc0RFeGNUR1owdnFTYm1TRnRfbnE5TjhZNms4IiwiaXNDb3Jkb3ZhIjpmYWxzZSwicmVkaXJlY3RVcmwiOiJodHRwczovL2RlbW8tY2hhdC5ib29uZXguY29tL2hvbWUifQ==&scope=basic