-
Notifications
You must be signed in to change notification settings - Fork 2.2k
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
Add OAuth application flow for builtin mobile app #15541
base: dev
Are you sure you want to change the base?
Conversation
d0b6a17
to
f17ce22
Compare
f17ce22
to
0b5ef1d
Compare
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.
The general direction is looking fine functionality and code wise. I like that the PR applies the structure of services/contracts to this part of the application as well.
Apart from what I noted down next to the code, documenting the feature is a necessity.
redirect_uri: "openprojectapp://oauth-callback", | ||
builtin: true, | ||
confidential: false, | ||
uid: "DgJZ7Rat23xHZbcq_nxPg5RUuxljonLCN7V7N7GoBAA" |
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.
💡 Since the UID is not secret it might help consumers to use something that is more readable, e.g. OpenProjectAppUID
(and something more if filling is necessary)
I18n.t(:button_activate), | ||
toggle_oauth_application_path(application), | ||
class: "oauth-application--edit-link icon icon-unlock", | ||
method: :post |
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.
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.
A somewhat unrelated question: Why not allow toggling the active status for all applications?
end | ||
end | ||
end | ||
end |
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.
This has no specs whatsoever. Since it is the piece of code guarding against invalid changes, having specs ensures everything is working as desired.
https://community.openproject.org/work_packages/53620