-
Notifications
You must be signed in to change notification settings - Fork 12.1k
[NEW] Added endpoint to get the list of available oauth services #10144
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
@rafaelks, could you take a look, please? |
@@ -18,6 +18,26 @@ RocketChat.API.v1.addRoute('info', { authRequired: false }, { | |||
} | |||
}); | |||
|
|||
RocketChat.API.v1.addRoute('oAuthServices', { authRequired: false }, { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What do you think about settings.oauth
?
rename endpoind to settings.oauth and fix lint problems
Docs. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just confirmed, it is working fine (@filipedelimabrito can use Heroku instance to test it for now):
$ curl -X GET "https://rocket-chat-pr-10144.herokuapp.com/api/v1/settings.oauth" | python -mjson.tool
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 95 0 95 0 0 136 0 --:--:-- --:--:-- --:--:-- 136
{
"services": [
{
"appId": "clientIdTest",
"id": "z4o9zPBYYLEAWGnXZ",
"name": "github"
}
],
"success": true
}
@MarcosSpessatto Thank you!!! 👊 |
Cool! Thank you! |
id: service._id, | ||
name: service.service, | ||
appId: service.appId || service.clientId | ||
}; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why not return buttonLabelText, buttonLabelColor and buttonColor
?
Added buttons Properties to response in settings.oauth endpoint
fix lint problem
Closes #8519.
Added endpoint to get the list of available oauth services.