api.user.setUserMetadata not working with postLogin action

Thanks for sharing that.

To be clear, you’re saying that line 60, api.user.setUserMetadata('external_user_id', results.external.user.id); isn’t working? But everything else fires properly in this action?

Is the external_user_id object showing up null or undefined in the user object after login, or just non-existent?

P.S. This Action could cause some issues for you in the long run by slowing down your login process or hitting the management API rate limit. Actions run on every authentication (including silent auth), and you should not be calling the management API every time a user authenticates.

1 Like