How to access return/output for a Custom Action 'action parameter'?

Custom Code

So I'm working on adding 2FA support to my app, as such I need to get the password from the user to reauthenticate them before performing authentication actions. I passed in an action parameter (getPasswordFromUser) using the Action Flow Editor that is just a Custom Dialog wrapped around a component (that gets a password from the user, then uses a buttom to dismiss the dialog with Has Value set to true, so it can return the password). This dialog is passed into my authentication function, however I'm struggling to get the password from the dialog within my custom action.

I know the action returns the password, because in Test Mode I see the password as the action output...however I can't seem to get to get the the dialog to return anything but null in the action code.


A possible workaround is to use FFAppState to store the password, but I also read that isn't safe or secure when dealing with sensitive data. Any ideas are welcome and appreciated!

What have you tried so far?

I've tried calling await getPasswordFromUser!() as well. I looked into FFAppState. I also tried calling the dialog from the action flow editor, and while that works, I have other places where I call this reauthenticate function ( or have similar code that tries to get the value of an action param dialog), and it would be great not to have to call the dialog separately each time. I also read all I could about custom action, but no where discusses if this is even possible.

Did you check FlutterFlow's Documentation for this topic?
Yes
2 replies