Invoke javascript method from microflow

I have a custom login button that validates the user credentials using a microflow. In microflow I need to invoke a javascript method that retrieves mobile system preferences and these values can be modified by user at any time. So on button click I need to invoke a javascript method to get the latest values.  I found many questions in forum about custom widget development. As per my understanding widget code is invoked when the page is loaded. How can I make sure Login button click retrieves the latest values?
1 answers

You have some options in this case:

- Use the JavaScript Button 

- Use conditional visibility in combination with the JavaScript-Snippet

- vote for call javascript from a nanoflow 

cheers! 🌟