colossal-appointment-48082
06/02/2023, 9:17 PMsquare-vr-55083
06/03/2023, 4:23 AMsquare-vr-55083
06/03/2023, 4:26 AMcolossal-appointment-48082
06/05/2023, 5:04 PMconst resp = await descopeClient.management.user.invite(
user["loginId"],
user["email"],
user["phone"],
user["displayName"],
// You can create with userTenants or roles, not both in the same action
roles,
// userTenants,
// Feature request: new option for query params to decorate the url on the invite link
[user['custom']]
);
the reason we want to do this. is we want to know which workspace the user is invited to so we can show them the correct workspace in the client on login.
Edit: Oh I think I see what you mean.
instead of using
descopeClient.management.user.invite
I should just do
descopeClient.management.user.update
to manually add a tenant and not send the descope email and then send my own email.
as for 2.
the specific problem we are running into
is we don't want to send an invite link and then have a user get another email for the magic link in a separate email causing them to have two emails just to login for the first time.
it would be great if we can send a magic link in the invite template but currently there is no way to do that.square-vr-55083
06/05/2023, 6:35 PMsquare-vr-55083
06/05/2023, 6:36 PMcolossal-appointment-48082
06/05/2023, 7:02 PMcolossal-appointment-48082
06/05/2023, 7:02 PMsquare-vr-55083
06/05/2023, 7:10 PMagreeable-river-38895
06/28/2023, 4:59 PM/invite
landing page.
1. Which calls from descope should we be calling from our backend? What is the difference between create and invite? It seems like we should manually create
the invited user and then handle the email separately?
2. How does the SendGrid connector come into play here? It looks like we don't really need that, and instead we should be using the SendGrid API directly to send our customized email?
Here is how I imagine our backend code should look, let me know if this makes sense!
// do something
...
const resp = await descopeClient.management.user.create(...)
if (resp.ok) {
sendgridClient.email(...)
}
square-vr-55083
06/28/2023, 6:01 PMagreeable-river-38895
06/28/2023, 6:02 PMsquare-vr-55083
06/28/2023, 6:08 PMsquare-vr-55083
06/28/2023, 6:10 PMbrash-pencil-33614
07/12/2023, 7:16 PMbrash-pencil-33614
07/12/2023, 7:16 PMsquare-vr-55083
07/13/2023, 5:18 AMbrash-pencil-33614
07/13/2023, 6:35 AMsquare-vr-55083
07/13/2023, 6:44 AM