Signup & Login
Add passkey authentication to your app with a single method call.
Using wagmi
Use the 1auth connector with Wagmi.
Install the SDK
npm install @rhinestone/1authCreate config.ts
Create a wagmi config file with the 1auth connector:
config.ts
import { createConfig, http } from 'wagmi'
import { base } from 'wagmi/chains'
import { OneAuthClient } from '@rhinestone/1auth'
import { oneAuth } from '@rhinestone/1auth/wagmi'
// Create the 1auth client
const client = new OneAuthClient({
providerUrl: 'https://passkey.1auth.app',
clientId: 'my-app',
})
// Create the wagmi config with 1auth connector
export const config = createConfig({
chains: [base],
connectors: [oneAuth({ client, chainId: base.id })],
transports: {
[base.id]: http(),
},
})Display sign in button
Connect with the 1auth connector from your config:
SignInButton.tsx
import { useConnect } from 'wagmi'
export function SignInButton() {
const { connectors, connect } = useConnect()
const connector = connectors.find((c) => c.id === '1auth')
return (
<button onClick={() => connect({ connector })}>
Sign in with 1auth
</button>
)
}Display account & sign out
Display the connected account and provide sign-out:
Using the SDK directly
Without wagmi, call authenticate() directly:
import { OneAuthClient } from '@rhinestone/1auth'
const client = new OneAuthClient({
providerUrl: 'https://passkey.1auth.app',
clientId: 'my-app',
})
// Authenticate or create an account
const result = await client.authenticate()
if (result.success) {
console.log('Address:', result.session.accountAddress)
}How it works
- User clicks sign in — your app calls
authenticate()or uses the wagmi connector. - Identity dialog opens — the user verifies email or OAuth identity.
- Passkey prompt opens in the app page — WebAuthn uses the exact page hostname as its RP ID.
- Success — you receive the smart-account address derived from
https://<hostname>.
clientId supplies app metadata but does not select the RP namespace.
Custom ENS names
Custom ENS names are available on request. Contact Rhinestone to configure resolution for your app.
Next steps
- Authentication - Learn about message signing and verification
- Checkout - Add payments with PayButton