Magic link email fails

Hi all,

I’m building an application that allows us to send a magic link to new users so that they could login to our system (and verify their email addresses at the same time), then allowing them to set a password for them to login normally.

I’m still working on the first step. From what I understand, this should work using login_or_signup. However, when I try this I’m getting ‘email_jit_provisioning_not_allowed’ and it’s failing. It seems that if I add the user’s domain into ‘allowed domains’ this works but I don’t know in advance all the possible domains our users will have so just want to allow all domains to accept invites. This doesn’t seem to be an option though. How do I do that?

Thanks,
Udi

Hey Udi, thanks for posting!

I believe you’ll just need to use the Send invite email endpoint, rather than the Send login or signup email endpoint.

Sending an invite email will explicitly invite that user to the Organization, which means that they’ll no longer be joining via JIT provisioning.

You’ll just need to make sure that the Organization’s email_invites property is set to ALL_ALLOWED, which means that users with any email domain can be invited to the Organization.

Happy to help with any additional questions you have about this!

1 Like

Thanks, Nicole! This is very helpful!

1 Like