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:- Find the user’s last used login method
- Check all available verified credentials
- Determine the type and provider of each credential
Finding the Last Used Login Method
Every user has alastVerifiedCredentialId 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
- React Native
- JavaScript
- Swift
- Flutter
- Unity
React
Credential Types (Format)
Theformat field on a verified credential indicates what type of authentication method was used:
| Format | Description |
|---|---|
blockchain | User authenticated by signing a message with a blockchain wallet |
email | User authenticated via email (OTP or magic link) |
oauth | User authenticated via a social provider (Google, Apple, Discord, etc.) |
passkey | User authenticated using a passkey (WebAuthn) |
Wallet Provider Types
When a credential has aformat of blockchain, the walletProvider field indicates what type of wallet was used:
| Wallet Provider | Description |
|---|---|
browserExtension | Browser extension wallet (MetaMask, Coinbase Wallet extension, etc.) |
embeddedWallet | Dynamic’s embedded wallet |
walletConnect | Wallet connected via WalletConnect protocol |
qrCode | Wallet connected by scanning a QR code |
deepLink | Wallet connected via deep link (mobile) |
custodialService | Custodial wallet service |
smartContractWallet | Smart contract wallet (account abstraction) |
OAuth Provider Types
When a credential has aformat of oauth, the oauthProvider field indicates which social provider was used:
| OAuth Provider | Description |
|---|---|
google | Google account |
apple | Apple ID |
discord | Discord account |
twitter | Twitter/X account |
github | GitHub account |
facebook | Facebook account |
twitch | Twitch account |
linkedin | LinkedIn account |
microsoft | Microsoft account |
farcaster | Farcaster account |
telegram | Telegram account |
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
- React Native
- JavaScript
- Swift
- Flutter
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
- JavaScript
React
Related Resources
Verified Credentials
Learn more about the verified credential structure and all available fields
Accessing Users
Different ways to access user information in your application