Is it possible to automatically retry a "Sign In /...
# ask-a-descoper
j
Is it possible to automatically retry a "Sign In / Password" step with a conditional step before the retry on the error case (the other step would be on Error in password sign in -> Mitigate)? This flow would look like: [Sign in screen] -> [Sign In / Password] -- (on error, Mitigate) --> [Scriptlet] --> [Sign In / Password] I tried inserting a conditional Scriptlet step on error after the first "Sign In / Password" (my use case is to adjust the externalId to a fallback value) and then re-route to "Sign In / Password" (tried both using a second Sign In / Password step and using the original one), for example, but I can't seem to model a programmatic retry in a flow. In the case where I tried a second Sign In / Password step, I think it lost scope of the original form's password, and in the retry the initial one case, it's not totally clear but I think it could be the same issue. I'd also be happy to programmatically adjust externalId if it doesn't match a known valid login ID, but I don't think there's a way to model that in flows without attempting a sign in, hence trying the approach above.
g
Jeffrey - interesting, but can you please elaborate on the use case? What are you going to do in the script for example?
If the password was wrong in the first action - what will the script do, to make the second attempt successful, without user interaction?
j
@Gilad Shriki our prior system i'm importing from would allow users to sign in quite flexibly, but i want to phase it out gently and possibly continue to perform a login ID sanitize step but with an audit event so i can monitor when we fall back to that vs. just blindly doing it. we have historically allowed customers to sign in with their company name, e.g.
Joe's Company
, which perhaps on mobile might autocomplete as
Joeʼs Company
with a stylized apostrophe on some mobile keyboards, in which case we'd sanitize it a bit and despite them typing it one way, we'd normalize it when matching which user to auth against. To be clear I think I can do this in Descope right now but not as an error fallback, only proactively between the Sign In screen and the Sign In / Password step, I think.
This is why I'm asking about retrying a Sign In / Password step without changing the user's original password, and in fact I don't even need to read it or do anything with it, I just want access to perform steps between like adding an Audit Log entry and using a Scriptlet entry to modify the username to a stripped down version (vs. inserting that Scriptlet up front before first Sign In / Password attempt).
g
Understood. Can you share the flow you are working on? project ID and flow ID is sufficient for me to take a look
j
Hi @Gilad Shriki, project ID
P319y1Kun5OkPwv5IvOijv3OgzHd
and a stubbed out sample flow ID
sign-in-sanitize-test
.
g
Jeffrey - first, think you have an issue in the scriptlet. use this regex instead:
/^[a-zA-Z0-9]/g
but I'm not sure about the rest of the playbook. I am not sure we keep the password value after the first attempt, so not sure you will be able to redo the action. @Aviad Lichtenstadt please keep me honest here
a
You are correct
👍 1