syndesisio / syndesis-react

[FORK] A flexible, customizable, open source platform that provides core integration capabilities as a service.
Apache License 2.0
3 stars 19 forks source link

feat: oauth flow for connections #426

Closed riccardo-forina closed 5 years ago

riccardo-forina commented 5 years ago

This is implemented up to the redirect back from the server.

Changes

oauth

Todo

Issues

riccardo-forina commented 5 years ago

PR Storybook available here

zregvart commented 5 years ago

This changes the OAuth login to open in a pop-up, should we worry about pop-up blockers?

riccardo-forina commented 5 years ago

The eventuality is trapped and a relative toast is displayed to the user explaining what’s happening. That said, we are opening a pop up as a direct and sole consequence of an user action, pointing to well known domains. I think the risk is quite remote.

riccardo-forina commented 5 years ago

PR Storybook available here

riccardo-forina commented 5 years ago

PR Storybook available here

riccardo-forina commented 5 years ago

@dongniwang the OAuth flow is slightly different than before, instead of redirecting the user to the 3rd party to eventually get back to Syndesis, the 3rd party authorization will happen in a popup. Advantages:

Cons:

riccardo-forina commented 5 years ago

This is the error condition I'm talking about.

oauth-misconfigured-angular

riccardo-forina commented 5 years ago

PR Storybook available here

riccardo-forina commented 5 years ago

I think this can be reviewed. Better handle the details page in another PR so to enable QA to do their thing.

dongniwang commented 5 years ago

Thanks for the update @riccardo-forina !

riccardo-forina commented 5 years ago

PR Storybook available here

riccardo-forina commented 5 years ago

Check the gif in the description, you can see the pop up there. Anyway, it will show a link asking to close the window, and that it will close automatically after 5s. And no, popup and messages are all the same for all the oauth connectors

pure-bot[bot] commented 5 years ago

Pull request approved by @gashcrumb - applying approved label

dongniwang commented 5 years ago

What would happen if the OAuth didn't go as planned? Do we have a toast notification or inline notification - assuming users would stay on step 2 - for that?

riccardo-forina commented 5 years ago

It depends on when the flow broke, if it was on the 3rd party page we have no control over that, it it was on the end of the flow the popup will close and a toast error notification with the error message will be displayed

zregvart commented 5 years ago

Epic work, thank you @riccardo-forina :+1: