Custom OAuth on Rocket Chat +

Hi guys, im working with Rocket Chat (web) and my custom OAuth.

It works great, but when i download the App ( Rocket Chat + ) and i try login in with some user from OAuth… it does not work. It even dont show the Custom OAuth button.

When i try login in it says “User has no password set” (and its okey… but should it be checking on OAuth if user exists ?)

Any idea ?

Thanks!

Best place for this type of thing is actually the Android repo where this missing feature actually has an issue open: https://github.com/RocketChat/Rocket.Chat.Android/issues/322

But yes basically Rocket.Chat+ does not have support for custom oauth yet, and unless you set a password, that error message is 100% correct. When logging in with oauth you’re authenticating with an oauth provider not Rocket.Chat.

Thanks @aaron.ogle

Im working on a temporal solution for this…

Im trying to implment AbstractOAuthFrament class

public class DgiOAuthFragment extends AbstractOAuthFragment {

  @Override
  protected String getOAuthServiceName() {
    return "dgi";
  }

  @Override
  protected String generateURL(LoginServiceConfiguration oauthConfig) {
    return new HttpUrl.Builder().scheme("http")
        .host("http://1.1.1.1:1111")
        .addQueryParameter("client_id", "xyz123")
        .addQueryParameter("display", "popup")
        .addQueryParameter("scope", "email")
        .addQueryParameter("state", getStateString())
        .build()
        .toString();
  }
}

But my main issue is i dont know how to implement the:

  • Token Path
  • Identity Path
  • Authorize Path