4ge
BABetter Auth
•Created by 4ge on 5/14/2025 in #help
better-auth passkeys + coinbase smart wallet? question about compatibility...
Hi everyone! 👋
I was stoked to see the recent tweet about the new Coinbase x402 plugin – excited for this direction for better-auth, looking forward to more web3 stuff (like SIWE?)
I was looking into how to integrate better-auth passkeys with a smart wallet system, specifically aiming for something like the Coinbase Smart Wallet (or similar stuff like accountkit/pimlico -- they all use viem or Oxlib under the hood i think).
The goal is to have a smart wallet counterfactually created for a user right when they register a passkey through better-auth in my Next app
I've been digging into a couple of resources:
- viem's toCoinbaseSmartAccount: https://viem.sh/account-abstraction/accounts/smart/toCoinbaseSmartAccount
- Oxlib's WebAuthn guide: https://oxlib.sh/guides/webauthn (which viem uses under the hood for some parts)
My main question is around the WebAuthn credential handling. For example, viem has methods like createWebAuthnCredential and toWebAuthnAccount. I know both better-auth's passkey registration and these viem functions probably ultimately use navigator.credential.create under the hood, but I'm wondering if the passkey credentials/public keys generated and stored by better-auth can be directly and seamlessly used with these viem (or oxlib) functions to init/control a smart account. anyone exploring this or have insights on compatibility here?
Any thoughts, experiences, or pointers from folks who've ventured into this territory would be massively appreciated! Thanks so much!
Sorry if this is a totally noob question!
10 replies