-
-
Notifications
You must be signed in to change notification settings - Fork 4k
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
feat: new re-authorization flow for Microsoft #9510
Conversation
@pranavrajs I figured the flow is simple enough that we don't need an additional screen for the reauthorization, let me know how it looks, I've attached a demo video. However I can see the value added by the dedicated pages, easier to provide more information also more detailed error messages. Let me know how this flow looks, I can create a PR on top of this to add the additional screens |
@scmmishra, great job! We wanted a separate page to display the error or success messages resulting from the flow. Currently, during our initial inbox setup process, we redirect users to the dashboard when an error occurs, which can be confusing. This has led to multiple reports from people who don't fully understand the error. This flow is fine. However, if we can ensure that the follow-up includes the screen mentioned in the issue, we can proceed with merging the PRs. |
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.
Minor comments, otherwise looks good.
@@ -20,6 +20,7 @@ | |||
get '/app/accounts/:account_id/settings/inboxes/new/microsoft', to: 'dashboard#index', as: 'app_new_microsoft_inbox' | |||
get '/app/accounts/:account_id/settings/inboxes/new/:inbox_id/agents', to: 'dashboard#index', as: 'app_twitter_inbox_agents' | |||
get '/app/accounts/:account_id/settings/inboxes/new/:inbox_id/agents', to: 'dashboard#index', as: 'app_microsoft_inbox_agents' | |||
get '/app/accounts/:account_id/settings/inboxes/:inbox_id', to: 'dashboard#index', as: 'app_microsoft_inbox_settings' |
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 do we need this?
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 original callback redirected to the app_microsoft_inbox_agents
this is the onboarding page where the admin is asked to add agents. The new route is for the inbox settings page, the user is redirected here when reauthorized, I can rename it to app_inbox_settings
since it is not Microsoft specific
@muhsin-k need your review on this PR, also if you can test it once, it'd be great! |
This PR adds a cleaner re-authorization flow to Microsoft. This PR has the following changes 1. Use `reauthorization_required` value for Microsoft Channel 2. Refactor `InboxReconnectionRequired` to reuse the `banner` component 3. Refactor `microsoft/Reauthorize.vue` to reuse `InboxReconnectionRequired` component 4. Update `reauthorizable.rb` to update cache keys if the model has an inbox 5. Update `microsoft/callbacks_controller.rb` to handle the reauthorization case with a redirect to the inbox settings page if the inbox already exists at the time of authorization. ## How Has This Been Tested? - [x] Local Instance - [ ] Staging Instance - [x] Unit tests ## Pending Tasks - [ ] ~Success Toast~ will do this in a follow-up PR with the screen ## Demo The following video shows the whole process of creation and re-authorization of the Microsoft channel https://www.loom.com/share/e5cd9bd4439c4741b0dcfe66d67f88b3?sid=100f3642-43e4-46b3-8123-88a5dd9d8509 --------- Co-authored-by: Muhsin Keloth <muhsinkeramam@gmail.com>
This pull request has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
This PR adds a cleaner re-authorization flow to Microsoft. This PR has the following changes
reauthorization_required
value for Microsoft ChannelInboxReconnectionRequired
to reuse thebanner
componentmicrosoft/Reauthorize.vue
to reuseInboxReconnectionRequired
componentreauthorizable.rb
to update cache keys if the model has an inboxmicrosoft/callbacks_controller.rb
to handle the reauthorization case with a redirect to the inbox settings page if the inbox already exists at the time of authorization.How Has This Been Tested?
Pending Tasks
Success Toastwill do this in a follow-up PR with the screenDemo
The following video shows the whole process of creation and re-authorization of the Microsoft channel
https://www.loom.com/share/e5cd9bd4439c4741b0dcfe66d67f88b3?sid=100f3642-43e4-46b3-8123-88a5dd9d8509