-
Hello! As documented in https://goauthentik.io/docs/flow/stages/email/#behaviour, I created an expression policy to set the email from the user "alternateEmail" attribute. Here is my policy:
Then I created a recovery flow like this: The expression policy is linked to the email stage: I expected the expression policy to be run after the Here is the flow in inspector: Before The identification stage, the expression policy was already run, and it changed the email to the After entering the user Am I doing something wrong? |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments
-
Hi @kukoarmas I'd like to add more info to our authentik documentation about this; I don't have an answer to your question right now, but we will be looking into it. |
Beta Was this translation helpful? Give feedback.
-
Hi again, @kukoarmas. This is likely not the full answer, but please take a look at the merged/closed PR #4784. In release 2023.3, we changed the default flow stage binding settings. Can you check on your Update Stage Binding modal that you have the second option, Evaluate when stage is run, turned on? To get there, go to Flows, and in the list of flows scroll down and click on It might be that stages are getting out of order, and that option will reset stages in realtime, if I understand it correctly. |
Beta Was this translation helpful? Give feedback.
-
Yes, the trick was enabling Evaluate when stage is run in the binding of my recovery-email stage Now, if the user has a recoveryEmail attribute, the recovery email is sent to that address. If there is no recoveryEmail attribute, the email is sent to the user's email address I think it would be great to have this whole configuration documented, because I've seen a several questions about this, and no clear answers. |
Beta Was this translation helpful? Give feedback.
Yes, the trick was enabling Evaluate when stage is run in the binding of my recovery-email stage
Now, if the user has a recoveryEmail attribute, the recovery email is sent to that address. If there is no recoveryEmail attribute, the email is sent to the user's email address
I think it would be great to have this whole configuration documented, because I've seen a several questions about this, and no clear answers.