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

Fix Invite Code Redirect in Middleware #185 #239

Merged
merged 1 commit into from
Sep 6, 2024

Conversation

BharathxD
Copy link
Contributor

@BharathxD BharathxD commented Aug 25, 2024

Description

This PR addresses the issue where invited users are redirected to the /setup page instead of the /teams/invite/[code] page after login. The middleware has been updated to correctly handle the invite code redirection.

Changes

  • Updated the invite code check in the middleware to ensure users are redirected to the correct invite page.

Flow Diagram

flow

Note

As I don't have this project running locally, I'm coming up with a quick fix. It might have other side effects that we need to look out for.

Related Issue

Fixes #185

Checklist

  • Ensure the invite code redirection works as expected.
  • Verify there are no unintended side effects.
  • Add tests to cover the changes if applicable.

Additional Context ⚠️

For the setup page, we should check if the user is already in a team. Currently, the user will still be forced to create a team even though they are already in a team. This needs to be addressed to improve the user experience.

Testing

Please ensure to test the following scenarios:

  1. Invited users are redirected to the /teams/invite/[code] page after login.
  2. Users without a full name are redirected to the /setup page.
  3. Users with MFA enrolled but not verified are redirected to the /mfa/verify page.

@pontusab
Copy link
Contributor

pontusab commented Sep 3, 2024

Sorry for the delay, this is awesome!

@pontusab pontusab merged commit 7af0bc5 into midday-ai:main Sep 6, 2024
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.

Issue with User Invitation
2 participants