NEED HELP ASAP! - Hey Descopers - I'm trying to us...
# ask-a-descoper
j
NEED HELP ASAP! - Hey Descopers - I'm trying to use the user-profile-widget's "TOTP User Auth Method" element. It works for setting up TOTP, but the "Remove user TOTP" flow does nothing for me. Any idea what I could be doing wrong?
c
@Bhagyesh Parna can you assist here
👍 1
@Jake Harris You do have the support remove enabled right? Worth getting a HAR - could be failing to load the user due to JWT not being correctly stored/loaded.
j
I do have it enabled
I tried to just have it display a modal when I first enter the flow and even that didn't work.
I think its not getting into the flow
b
Hi Jake, could you share the projectID and flow that you are facing this issue in?
j
@Bhagyesh Parna project id is P353z9YzJ4RC0AG4Raclq6rjdNBI
I have created a workaround where we have another field - and when user goes to edit - we are clearing out the totp. But ideally we would have the remove work properly. I have put back the remove just now so you can see it.
@Bhagyesh Parna any updates? I'm going to have to go with my workaround instead. Let me know if you have any new ideas.
b
Hey Jake, connecting with the team internally on this, will reach out with an update soon!
Hey @Jake Harris, apologies for the delay, we are working on getting this fixed. We tested out the action in the flow editor and it is working there. Will update you as soon as this issue is resolved!
🙌 1
@Jake Harris Could you try this again? I just tested it and the Remove user TOTP in the user-profile-widget is working as expected! Let me know if you are still facing this issue.
j
@Bhagyesh Parna we will try that but now we are running into something else. We are trying to get the tenant id in our invite flow so that we can tell the user what tenant id to put in. We don't seem to have that value in the template variables. What do you suggest we do? Thank you!
b
Hey Jake, trying to understand your use case here so I can provide better guidance, appreciate if I could get some info on the below: • Where is the tenant chosen today? • Are you letting the user pick a tenant in the invite flow itself, or is your backend already deciding which tenant they belong to when you trigger the invite? • What do you want the user to do with the tenant ID in the email? • Is the idea that: ◦ They copy paste the tenant ID into a field on your app? ◦ Or they just see it as a reference (“You were invited to tenant X”)? ◦ Or something else (e.g. share it with coworkers)? • Is the invite link already tenant-scoped? • When you create the invite, are you passing a specific tenant into the Descope call, or are you expecting the user to choose the tenant only after they click the link? • Do you have multiple tenants per user, or exactly one?
j
@Bhagyesh Parna ok we were able to figure this out actually. We invite them from the account management widget - but we created our own flow to create the user that makes an API call - and it passes in the tenant id in as a template variable for the invitation.
@Bhagyesh Parna we do have a final remaining issue where we need some assistance. We are using the user management widget. We want to give users the ability to cancel invitations (deleting them) but don't want to have people fully delete regular users. We thought we could do something with an API call again, but we aren't able to tell which user(s) they have selected to cancel the invitations to. It seems like we just need a variable name, but maybe its more complex. Any ideas?
b
Nice, glad you got the tenant ID piece working! For cancelling invitations, a pattern you could use is a custom action on the User Management widget that runs a small management flow, and that flow only deletes users that are still in an “invited” state. Concretely, something like: • Add a custom button to the User Management widget (e.g. “Cancel invitation”). • Wire it to a management flow that receives the user(s) selected in the table. • In that flow, look up each user and, if their status is still
Invited
/ never logged in, call the Delete User/cancel invite step. For fully active users the flow can just no op or show an error so normal admins can’t hard-delete real users by mistake. I’m going to double-check exactly what data the widget passes into that custom-button flow (and the variable name for the selected row/s). I will also check internally as well to see if we have a better recommended approach to this!
j
Thanks @Bhagyesh Parna for the quick response here. What you describe sounds like what we need - so very interested in getting the details. I know most of how to do that stuff - but its getting the selected users that I'm running into issues with.
@Bhagyesh Parna do you have an update for us here?
b
Hi @Jake Harris, yes we are looking into this internally today. Will update as soon as I get more info on this!
🙌 1
j
@Bhagyesh Parna wanted to check in to see how things were going on this request and if you had any idea on timing when you could get back to me. We really appreciate your support!
b
Hey Jake, apologies for the delay, I checked internally on this. Right now we don’t have a way to revoke a specific magic link token once it’s been sent, the best approach here is to delete/disable the user. I am testing out if there is a way to get only the users that are in an "invited" status into the user management flow. Just to confirm I am understanding this correctly- you want to be able to only select users that are currently in the "invited" status and only delete them right?
j
We want it to fail if the user is an actual user. We don't see a way to do that in flows because we can't get any information about the user that is selected when the button is pressed. I would think it would be a variable...?
@Bhagyesh Parna wanted to check in to see if you had any ideas about timing for a resolution here?
b
@Jake Harris, I'm expecting to have more info by eod tmrw at the earliest or early next week at the latest for this!
j
Sounds good @Bhagyesh Parna - I appreciate the update!
b
Hey @Jake Harris, did a lot of digging internally on this. We currently don't have the option to create flows on the user management widget so you won't be able to do the above just yet, but we have a dev ticket in the pipeline for this exact feature. I don't have a specific timeline for this but will push for this to be prioritized!
j
Thanks for the update @Bhagyesh Parna - this would be a wonderful feature. Would you be able to let us know if it gets released? Thanks again for all your help!