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

Invite page always shows sign up dialog #281

Closed
mikeminutillo opened this issue Jan 8, 2025 · 3 comments
Closed

Invite page always shows sign up dialog #281

mikeminutillo opened this issue Jan 8, 2025 · 3 comments
Labels
bug Something isn't working

Comments

@mikeminutillo
Copy link
Contributor

Describe the bug

Every time you follow an invite link, the sign-up modal dialog is displayed even if you are logged in.

If you log in to an existing account with username and password, then the modal goes away and you can access the join button.

If you attempt to log in with a google account, the OAuth workflow redirects you to the homepage. Navigating back to the invite presents the dialog again.

This means it is impossible to join a community with a google login workflow.

To Reproduce

Steps to reproduce the behavior:

  1. Log in to playabl
  2. Follow an invite link
  3. Note the create account dialog

Expected behavior
A clear and concise description of what you expected to happen.

If you are already logged in, following an invite link should not prompt you to log in again.

Screenshots
If applicable, add screenshots to help explain your problem.

image

Desktop (please complete the following information):

  • OS: Windows 11
  • Browser: Chrome
  • Version [e.g. 22] 131.0.6778.205 (Official Build) (64-bit) (cohort: Stable)

Additional context
Add any other context about the problem here.

I haven't had time to prove it but this seems likely to be a race condition of some kind.

The InvitePage checks for user info when it is mounted but that info is loaded via a callback. If the page mount happens before the callback fires, then the dialog will be shown.

A potential solution might be to move the Join button and all associated logic into a component and put it inside an AuthShell which properly handles the login state machine.

I might get a chance to try that out this week.

@mikeminutillo mikeminutillo added the bug Something isn't working label Jan 8, 2025
@mikeminutillo
Copy link
Contributor Author

Hah. I should have checked for a PR first #280

@jongrim
Copy link
Contributor

jongrim commented Jan 11, 2025

Ha, no worries! I've got got to figure out why the dang supabase github action doesn't work anymore so I can merge it. If it keeps giving me issues I might temporarily bypass it to get this in sooner than later.

@mikeminutillo
Copy link
Contributor Author

Fixed by #280

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants