## AUTHENTICATION

## Authenticate users into your app

Authenticate users to your app with any log-in method and automatically create wallets for users who don’t have one.

[Get a demo](/content/contact/sales/index.html) [Read the docs](https://docs.crossmint.com/authentication/introduction)

## Every log-in method

Allow users to sign in to your app however they like, manage sessions, and offer the best possible UX for onchain apps.

**Email**  
Magic links, Gmail SSO

**SMS**  
International phone numbers

**Social Accounts**  
X, Farcaster, and more

**Web3 Wallets**  
Any wallet across chains

.svg)

## Key features

- **UI customization**  
Style the auth flow to make it feel native to your site  
- **Headless APIs**  
Build your own UI for full customization  
- **Whitelabeling**  
Remove all Crossmint branding. Make it about you  
- **Custom auth**  
Bring your own authentication provider  
- **Session management**  
Easily manage user sessions, tokens, and timeouts  
- **SSR compatible**  
Authenticate your users server-side with cookies  
- **Wallet pre-generation**  
Create wallets and airdrop assets before users sign in  
- **10+ log-ins methods**  
Email, sms, socials, crypto wallets on EVM or Solana

## Create wallets for users who don’t have one

Deploy new wallets automatically for users who don't have one

**Hold balances**  
Store stablecoins, crypto, NFTs or any other digital assets

**Make money move**  
Transfer funds instantly across the globe, or make payments

**Sign transactions**  
Request users to sign transactions or do it from your server

**Connect to other sites**  
Optionally allow users to connect to any website or app.

## Start onboarding users in 5 minutes

[JavaScript](/content/products/authentication#w-tabs-0-data-w-pane-0/index.html)

This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
[Learn more about bidirectional Unicode characters](https://github.co/hiddenchars)

|     |     |
| --- | --- |
|  | functionAuthButton(){ |
|  | const{ login, logout, jwt }=useAuth(); |
|  | const{ wallet }=useWallet(); |
|  |  |
|  | return( |
|  | <div> |
|  | {/\* Login/Logout Button \*/} |
|  | {!jwt ? ( |
|  | <buttononClick={login}> |
|  | Connect Wallet |
|  | </button> |
|  | ) : ( |
|  | <buttononClick={logout}> |
|  | Disconnect |
|  | </button> |
|  | )} |
|  |  |
|  | {/\* Wallet Display \*/} |
|  | {wallet&&( |
|  | <div> |
|  | Connected: {wallet.address} |
|  | </div> |
|  | )} |
|  | </div> |
|  | ); |
|  | } |
|  |  |
|  | // Wrap your app with Crossmint providers |
|  | exportdefaultfunctionApp(){ |
|  | return( |
|  | <CrossmintProviderapiKey={YOUR_API_KEY}> |
|  | <CrossmintAuthProvider |
|  | embeddedWallets={{ |
|  | type: "evm-smart-wallet", |
|  | defaultChain: "polygon-amoy", |
|  | createOnLogin: "all-users", |
|  | }} |
|  | loginMethods={\["google","twitter","farcaster","email"\]} |
|  | > |
|  | <AuthButton/> |
|  | </CrossmintAuthProvider> |
|  | </CrossmintProvider> |
|  | ); |
|  | } |

[view raw](https://gist.github.com/jose-paella/7413f34fb9e43dcb20b4589bde279508/raw/8f7112e66853b0998324e9e877f116dfa247ec49/auth-code.js) [auth-code.js](https://gist.github.com/jose-paella/7413f34fb9e43dcb20b4589bde279508#file-auth-code-js)

## Get started in 5 minutes  Be ready to scale

[Read the docs](https://docs.crossmint.com/authentication/introduction)
