Rocket.chat: [REGRESSION] Mobile apps depending on settings again to show the OAuth options

Created on 8 Jun 2018  路  1Comment  路  Source: RocketChat/Rocket.Chat

Description:

After this PR https://github.com/RocketChat/Rocket.Chat/pull/10724, the WordPress authorization option聽differs based in a setting of the server. This information needs to come on the OAuth services API. The client should not need both Settings + OAuth APIs to present the OAuth options.

On mobile, we're forcing the WordPress to use this URL to authorize the user:

https://public-api.wordpress.com/oauth2/authorize

We've two options:

  1. Return the correct authorization URL to the API;
  2. Return some information on the API that allow us to choose between different URLs in the clients;
api regression

Most helpful comment

Can we maybe switch all oauth to use the exact same custom oauth? This way when the mobile teams call the api they will get all values needed and not have to depend on settings for some and the api for others?

By custom oauth I mean using the internal api defined here: https://github.com/RocketChat/Rocket.Chat/blob/develop/packages/rocketchat-custom-oauth/server/custom_oauth_server.js that end users use to define custom oauth. If we could either use the exact same api by all to register oauth. Or... at the very least make sure the rest endpoint returns all non-custom oauth and all values. (ie no guessing or hard coding needed ios/android side)

I think this is going to be extremely important, especially since in the future we might be moving to adding in oauth providers via Rocket.Chat Apps.

>All comments

Can we maybe switch all oauth to use the exact same custom oauth? This way when the mobile teams call the api they will get all values needed and not have to depend on settings for some and the api for others?

By custom oauth I mean using the internal api defined here: https://github.com/RocketChat/Rocket.Chat/blob/develop/packages/rocketchat-custom-oauth/server/custom_oauth_server.js that end users use to define custom oauth. If we could either use the exact same api by all to register oauth. Or... at the very least make sure the rest endpoint returns all non-custom oauth and all values. (ie no guessing or hard coding needed ios/android side)

I think this is going to be extremely important, especially since in the future we might be moving to adding in oauth providers via Rocket.Chat Apps.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

brendanheywood picture brendanheywood  路  3Comments

Kiran-Rao picture Kiran-Rao  路  3Comments

Buzzele picture Buzzele  路  3Comments

tanc picture tanc  路  3Comments

antn89 picture antn89  路  3Comments