Represents User identities obtained from external identity providers.
When a user authenticates using an external provider like Google OAuth, information from that provider will be made available as one of the user’s Identities. You can read more about the process in our identity linking guide.
Applications should check the type before making assumptions about the shape of the identity. Currently only OAuth identities are supported, but more types may be added in the future.
{ "idp_id": "4F42ABDE-1E44-4B66-824A-5F733C037A6D", "type": "OAuth", "provider": "MicrosoftOAuth" }
identityGet a list of identities associated with the user. A user can have multiple associated identities after going through identity linking. Currently only OAuth identities are supported. More provider types may be added in the future.
import { WorkOS } from '@workos-inc/node'; const workos = new WorkOS('sk_example_123456789'); const identities = await workos.userManagement.getUserIdentities( 'user_01E4ZCR3C56J083X43JQXF3JK5', );
userManagement .getUserIdentities()Parameters Returns