Replies: 2 comments 3 replies
-
I think some sort of invitation API would be a good way to support doing this sort of thing. We did have an issue (or two) where we talked about this in the past, it might have been auto-closed by the bot since then though. Would be great if someone could dig the issue out and tag it here, will track it! |
Beta Was this translation helpful? Give feedback.
0 replies
-
Hi, in case it helps, I've implemented an invite process in my app, this is mostly code copied from the |
Beta Was this translation helpful? Give feedback.
3 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Your question
How can I prevent having to send a new user 2 emails?
What are you trying to do
I have a multi-tenant application where users need an email invitation for signup before they can sign-in later(with either Google or Email providers). This means that for a user that chooses Email; they receive a second email from the application in order to sign-in which is less user-friendly than I'd like. I want to merge both steps into a single email such that the single email is sufficient to signup and perform Email sign-in.
In order to do that I am considering the following options:
Highjacking the
sendVerificationRequest
function. I could programmatically make a request to the Email provider after completing the user's signup(without sending an email) and customize thesendVerificationRequest
function to include the token in what will serve as a signup/sign-in email. This has the adverse effect of locking the user into only being able to use Email sign-in going forward.Manually create a token for the user after signup email. The idea here is that I will introduce a custom endpoint where requests for a new user, wishing to sign-in, is sent. The endpoint will create an entry for the user in the
verification_requests
table and then redirect the user's request(modified to include the manual token) to the Email provider URL.Is this(preventing double emails) worth doing? Are the options listed above recommended or is there a better approach?
Beta Was this translation helpful? Give feedback.
All reactions