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

[DEV-MODE]: Resend callbackUrl when inviting a new member (for testing) #822

Open
mxkaske opened this issue May 20, 2024 · 0 comments
Open

Comments

@mxkaske
Copy link
Member

mxkaske commented May 20, 2024

Description

Note

This behaviour is for local environment only,

For non-logged in users:

Whenever a user invites another user, we create a token and append it to the invite url: https://localhost:3000/app/invite?token=xyz. The user will get redirected to /app/login?redirectTo=https://localhost:3000/app/invite?token=xyz.

If using GitHub or Google, all good.

If using Magic Link, Resend with attach two new search params: token and callbackUrl=app/login.

To avoid the confusion, we can rewrite token to access-token e.g. but there is still the issue of the callbackUrl that weights heigher than the redirectTo and redirects to /app/login after clicking the magic link instead of /app/invite?token=xyz - losing the user flow.

For logged in users, the will access immediately /app/invite?token=xyz and accept the invitation.

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

No branches or pull requests

1 participant