If you want to generate a token for a user you need to:
- Make a backend workflow and expose it as a public API workflow, this workflow only includes a login action.
- Using the API connector make a call for this workflow, this call should be used as an action.
- Add this action (the API call) to a workflow and the result of it will be the token.