hey folks - I think we have a regression in passwo...
# ask-a-descoper
g
hey folks - I think we have a regression in password set action, I'm pretty sure it worked before. Don't see errors in the console, but once I click on "Continue" it got stuck on loading Any idea how to debug/understand what's wrong?
m
looping in @Rahul Rijhwani @Reuven Zabirov
đź‘€ 1
do you see any error on troubleshoot logs page ? can you share project id ?
g
no, the update password succeed btw P2pFtDmUxY4TCIz0xTpfbyi4d52v
don't know if this helps @Meir Wahnon @Rahul Rijhwani
d
@Gal Malachi can you share the entire flow? In the logs I see that after the “Update Password” action, it goes to “Custom Claims” action, then to “Check if has more than 1 tenant” and then to “End”, so there is no screen involved, it just goes to the End of the flow, do you get something in the onSuccess?
g
yes, it should go to end, and redirect to the app no?
d
No, it will trigger the onSuccess hook
g
image.png
I'm confused because I'm pretty sure it worked when I just set this up
d
There is no auto redirect, we can’t really know to there
g
ok so I should add a onSuccess hook and then what?
d
You can navigate to the desired place in your app
Where is this flow triggered?
g
trying to understand why this is different than other sub-flows, they all go to the same end stage
and these flows will redirect to the app
d
is this flow is part of other flow? what do you have after that sub flow on the parent flow?
In SSO/Social there is redirect back to the flow after going to the IdP/Provider, so maybe you are talking about that redirect.
g
this is the entire flow
d
In the update password you are already in your app, so there is no way to redirect..
Is this a sub flow inside a parent flow?
g
nope, I meant other paths when saying "subflow"
d
are you sure you have redirects? (Not talking about the redirect to the OAuth social provider and back)
In SSO / OAuth social, there is redirect to the IdP (Google/Okta..), and then back to your app.
In the update password you are not redirected anywhere, so you are in the app already.
g
What would be the best way to solve this? I still need to go through the custom claims, etc
d
How does it run? in a modal?
If so, just close the modal
or is it part of the login?
g
part of login
d
So you should do the redirect to the correct page in the onSuccess
Can it be that your SSO / OAuth has a redirect defined to a different page?
g
in this tenant I don't have SSO configured
d
Not specific for a tenant
In general
g
or you asking in general, but if SSO, you won't go through password reset/set here
if I do on success, how do I got via custom claims etc
d
the onSuccess is after the End step
so it is after the custom claim action
g
where do I configure it?
but still, won't it force me to specify a hardcoded path, instead of using the callback url as configured today?
And I'm still 100% sure it worked before 🙂
I mean I copied it from a template
d
What callback url?
Where is it defined?
g
you go to mainDomain/dashboard you are redirected to signin?callbackUrl=dashboard
d
I see but what is
callbackUrl=
?
I don’t think we support such thing? maybe you catch it in your app?
g
Yes, I manage it after a successful auth
d
I think you are adding it
callbackUrl=dashboard
ok
So not sure I understand the problem, basically in the onSuccess you need to do whatever you need to continue. That’s how it works since day 1.
Since we don’t know what to do at the end of the Flow.
Some show it in a modal, some in a page, some in a component inside the app.
So at the end they can decide what to do.
g
maybe I'm missing something here, I would expect that once "end" is reached, the redirectAfterSuccess will happen
so what I'm trying to understand, is why after a successful setPassword action, it doesn't go to the rest of the flow, then to end, then to redirectAfterSuccess
as other paths in the app do, like sso action, social login action, etc
but also, I'm positive that this was the situation when I configured this. because I manually tested password, and it didn't get stuck on setPassword as it is today
d
oh, yes it should be called,
You don’t see the redirectAfterSuccess invoked at all?
g
it's stuck here
d
Can it be that the
safeCallbackUrl
is empty for some reason?
g
nope, it has a default of "/"
d
Does it work for regular sso login? without the set password? since we don’t care about that is going on inside the flow when invoking the
redirectAfterSuccess
I don’t see any error in the logs, it seems that the operation got successfully ended.
can you send the HAR file when it happens?
g
it works with google login
also with sso
yes will share soon
this is kinda weird, I get 200 on the /next and then see the redirect to https://app.staging.terra.security/en/sign-in?callbackUrl=%2F but it won't redirect
I see now that google won't work either
so maybe this is something on our side
I will investigate
👍 1
ok, seems like the handling of session was changed to response body instead of cookie I'm not sure why yet, but it blocked this flow from working (probably middleware on our side)
d
Ok, you can check what changed in the audit log
g
@Doron Sharon is it possible to override the handling in cookie in some env? I have both web, and electron app that uses the same project in web I'd like to limit for session cookies, but if using electron, since the web server is bundled and essentially running on localhost, cookies won't work as they are tied to a domain name
d
It is not secured to control this via the client since then the attacker will send that they want it via non cookie.
g
Yes, Asaf suggested using custom storage and call the backend to generate http only cookie from response in body but as I see it doesn’t support async ops