Merged
Conversation
added 2 commits
May 18, 2023 12:32
- It was previously here, but got probably got lost during migration into newer version of Vue - Without this an invited user doesn't get their invitation accepted when they signup with a social account
Contributor
Author
|
Added videos explaining buggy and fixed behavior |
gaspergrom
approved these changes
May 19, 2023
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Changes proposed ✍️
What
Fixes two issues with signing up with a google account:
tenantUserremains in ainvitedstate, cause all/api/tenant/:tenantId/...requests end up with 403./onboardpage, but with lots of error toasts in the bottom right corner. This happens because when a google signup redirects the user back to the app, they're redirected to the root page/, which tries to render the dashboard. And since the user doesn't have a connected workspace yet, all the requests made by the dashboard trying to render itself (such as/api/tenant/:tenantId/activity/queryor/api/tenant/:tenantId/conversation/query) fail because with emptytenantIdthey look like/api/tenant/null/activity/query. Eventually the frontend figures out that there is notenantIdand redirects the user to/onboardpage, but the dashboard already tried to render and made all those XHR requests.Copilot summary
🤖 Generated by Copilot at 2ee2bd2
Added social onboarding feature for email and password users and improved dashboard data rendering based on current project or organization. Updated
main.jsto import and useAuthServicemodule and addedcurrentTenantproperty todashboard-page.vue.
Copilot poem
🤖 Generated by Copilot at 2ee2bd2
Why
Because these are bugs
How
/api/auth/social/onboardendpoint, which takes{ invitationToken, tenantId }and accepts the invitation changing status oftenantUsertoactive. This call used to be done by the frontend at some point, but was removed as part of Vue 3 migration PR.Copilot walkthrough
🤖 Generated by Copilot at 2ee2bd2
AuthServicemodule to handle social onboarding requests inmain.js(link, link)currentTenantproperty to render and fetch dashboard data only when tenant data is available indashboard-page.vue(link, link)Videos
Signing up with google via invitation before the fix
invited-google-signup-before.mp4
Clean google signup before the fix
clean-google-signup-before.mp4
Signing up with google via invitation after the fix
invited-google-signup-after.mp4
Clean google signup after the fix
clean-google-signup-after.mp4
Checklist ✅
Feature,Improvement, orBug.