Skip to main content

Recommended: JavaScript SDK with React Hooks

For new React apps, we recommend the JavaScript SDK with React Hooks (@dynamic-labs-sdk/react-hooks) instead of the legacy React SDK documented here. The JS SDK comes with many benefits such as a much smaller bundle size and other optimizations. Use the React quickstart (JavaScript SDK) to get started.

Introduction

When a user authenticates with Dynamic, they may use various methods such as email, social login, passkey, or connecting a wallet. Understanding which method they used - and which one was used most recently - is essential for building personalized experiences and implementing proper session management. This guide shows you how to:
  1. Find the user’s last used login method
  2. Check all available verified credentials
  3. Determine the type and provider of each credential

Finding the Last Used Login Method

Every user has a lastVerifiedCredentialId property that points to the credential they most recently used to authenticate. You can use this ID to look up the credential in the verifiedCredentials array.
React

Credential Types (Format)

The format field on a verified credential indicates what type of authentication method was used:

Wallet Provider Types

When a credential has a format of blockchain, the walletProvider field indicates what type of wallet was used:

OAuth Provider Types

When a credential has a format of oauth, the oauthProvider field indicates which social provider was used:
See the full list of supported social providers in Social Providers.

Iterating Through All Credentials

You can also iterate through all of a user’s verified credentials to understand their full authentication history:
React

Determining Login Method Type with Helper Functions

Here’s a helper function pattern you can use to easily determine the login method type:
React

Verified Credentials

Learn more about the verified credential structure and all available fields

Accessing Users

Different ways to access user information in your application
Last modified on June 25, 2026