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

Feature Request: Invite-Only Mode #172

Open
imnotjames opened this issue Jan 21, 2025 · 8 comments · May be fixed by #175
Open

Feature Request: Invite-Only Mode #172

imnotjames opened this issue Jan 21, 2025 · 8 comments · May be fixed by #175
Assignees
Labels
enhancement New feature or request

Comments

@imnotjames
Copy link

As far as I can tell this isn't currently supported.

It'd be helpful to have the ability to restrict sign-ups after the initial user has signed up on self-hosted installations.

As a self-hosted administrator of an instance, I want to support magic links but not allow ANYONE to sign up so I can avoid spam users.


This is something I'll be working on as long as there's no qualms with it getting merged in.

@KMKoushik
Copy link
Member

thank you

@KMKoushik KMKoushik added the enhancement New feature or request label Jan 25, 2025
@ivanzgroot
Copy link

ivanzgroot commented Jan 26, 2025

Hello, I just got my instance working today. After some problems with the login screen not displaying that I solved described in my Issue I opened before.
Now I am able to register/login as first user, but the ones I invite after don't receive the invitation e-mail. Is there something new been added yesterday that has yet to be documented? or am I doing something wrong?
Thanks in advance
PS. Invites are enabled in the variables file.

@imnotjames
Copy link
Author

Hello, I just got my instance working today. After some problems with the login screen not displaying that I solved described in my Issue I opened before. Now I am able to register/login as first user, but the ones I invite after don't receive the invitation e-mail. Is there something new been added yesterday that has yet to be documented? or am I doing something wrong? Thanks in advance PS. Invites are enabled in the variables file.

Pretty sure that's unrelated to this issue as this issue is for enabling an "invite-only" mode.

@imnotjames
Copy link
Author

Okay, taking a look: next-auth sure doesn't make this easy.

We can't hook in before a user is created across all adapters & auth mechanisms.

The createUser event is fired AFTER the user is created but we can hook before individual providers I guess..

Email: sendVerificationRequest can check if the flag is set and if the user already exists before it sends the verification request?
Various other providers are all over the place.

We could wrap the prisma provider and disallow the createUser helper if an env var is set.

@imnotjames imnotjames linked a pull request Jan 26, 2025 that will close this issue
@KMKoushik
Copy link
Member

@ivanzgroot regarding invite email, did you add the smtp details?

https://github.com/oss-apps/split-pro/blob/main/.env.example#L37

@ivanzgroot
Copy link

yes, the smtp is configured correctly. I think it is some kind of weird bug having to do with Safari on iOS.
Both of the users weren't getting the e-mail for login and both of them were using Safari on iOS. I tried logging in for them on my Macbook and they received the e-mail with the token.
After they added the PWA to their home screens they tried logging in on their own and it worked.
This is why I think it had to do with Safari on iOS, but it might also just be coincidence.

@KMKoushik
Copy link
Member

i would say it's coincidence cuz, pwa still opens in safari

@KMKoushik
Copy link
Member

also as @imnotjames mentioned, can you see the email from your email account?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants