# Linked Identities - which was used to login?

**URL:** <https://community.auth0.com/t/linked-identities-which-was-used-to-login/123161>\
**Category:** Get Help\
**Tags:** new-universal-login-experience, login-experience\
**Created:** [December 15, 2023, 3:32pm UTC](https://community.auth0.com/t/linked-identities-which-was-used-to-login/123161 "2023-12-15T15:32:37Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![james.west](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/james.west/32/33232_2.png) [@james.west](https://community.auth0.com/u/james.west)\
**Post date:** [December 15, 2023, 3:32pm UTC](https://community.auth0.com/t/linked-identities-which-was-used-to-login/123161/1 "2023-12-15T15:32:37Z")

</div>

If we have a user with multiple identities linked - can we determine which one was used to login to a react app with?

const { user } = useAuth0(); is always the primary even if I authenticated with a secondary identity…

---

<div class="post-metadata">

**Author:** ![james.west](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/james.west/32/33232_2.png) [@james.west](https://community.auth0.com/u/james.west)\
**Post date:** [May 10, 2024, 5:01pm UTC](https://community.auth0.com/t/linked-identities-which-was-used-to-login/123161/3 "2024-05-10T17:01:39Z")

</div>

```auto
exports.onExecutePostLogin = async (event, api) => {
    
    api.idToken.setCustomClaim("auth_connection_name", event.connection.name);
    
};

```

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/auth0/original/3X/b/5/b560f266932fcce5d57f09a6595bd50518cae3f3.jpeg) [@system](https://community.auth0.com/u/system)\
**Post date:** [May 24, 2024, 5:02pm UTC](https://community.auth0.com/t/linked-identities-which-was-used-to-login/123161/4 "2024-05-24T17:02:20Z")

</div>

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.
