Account Linking in Actions - How to Keep the User Logged In
Sep 10, 2025
Overview
Cause
This can cause issues if the secondary account is what started the login transaction, as, by the end of the Action flow, the secondary User ID no longer exists.
Solution
api.authentication.setPrimaryUser(<primary_user_id_here>);
Related References
- Actions Triggers: post-login - API Object
- There is a more complete example of account linking with Actions here: Account linking with Actions