Skip to content
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

Remove OAuth helpers elements #712

Closed
wants to merge 1 commit into from

Conversation

twoplustwoone
Copy link
Contributor

As mentioned in #678

OAuth helper elements are now found in the api-request component, and should therefore be removed from api-console-app

@twoplustwoone twoplustwoone requested a review from a team as a code owner August 31, 2021 20:58
@jarrodek
Copy link
Contributor

jarrodek commented Sep 2, 2021

I believe I made a mistake when I was putting the api-request library together. The point of using the oauth2-authorization element is to have a solution that works out-of-the-box for the API console. However, this is not suitable for all scenarios. Even in the Anypoint platform, we use events handling to proxy authorization requests as only (legacy) implicit flow can be supported this way. Other flows are blocked by CORS. When we put these components into the request editor (as it is right now) then the event is always handled by this component, regardless of handling the event elsewhere.

This should work as follows:

  • only the api-console-app has included OAuth (and upcoming OIDC) authorization components
  • all other components should not reference them, unless in the demo pages
  • whether you are using api-console or any component it's your responsibility to include these components or handle the events

This way we remove the logic that the application doesn't use and we eliminate confusion caused by these components.

@jarrodek
Copy link
Contributor

jarrodek commented Sep 2, 2021

We would need to update docs as well to explain how to handle authorization.

@twoplustwoone
Copy link
Contributor Author

Alright, I'll make the change in ApiRequest to remove the oauth components, and close this PR

@twoplustwoone twoplustwoone deleted the fix/remove-oauth-elements branch September 2, 2021 20:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants