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: frontend bugs relating to redirects/tenants #25

Merged
merged 5 commits into from
Dec 26, 2023

Conversation

abelanger5
Copy link
Contributor

Fixes the following frontend and onboarding bugs:

  • Adds a query param tenant to application routes, with the following behavior:
    • When there is a tenant parameter set which the user is a member of, the application will set that as the currently selected tenant
    • When there is a tenant parameter set which the user is not a member of, or there is not a tenant parameter set, the application will look in localStorage for the value of lastTenant and set that as the currently selected tenant
    • When there is not a lastTenant value set, or the user is not a member of that tenant, the application will select the first tenant in the membership list

Additionally, this PR adds the following:

  • Allows setting an environment variable SERVER_AUTH_SET_EMAIL_VERIFIED to true which automatically sets the email to verified for new signups, since most local installations won't have an email verification mechanism
  • When a user is logged in, navigating to /auth/login or /auth/register will redirect to the application via the no-auth.tsx middleware
  • When there are no events found, the backend will no longer respond with a 500-level error, and will return 0 rows instead

@abelanger5 abelanger5 changed the title chore: fix frontend bugs relating to redirects/tenants fix: frontend bugs relating to redirects/tenants Dec 23, 2023
@abelanger5 abelanger5 merged commit ce61ead into main Dec 26, 2023
3 checks passed
@abelanger5 abelanger5 deleted the belanger/tenant-localstorage-fixes branch December 26, 2023 14:11
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.

None yet

2 participants