How email OTP works
Security features
User experience benefits
AuthButton
component from @coinbase/cdp-react
: Pre-built UI component (fastest integration)@coinbase/cdp-hooks
: For custom React UIs with state management@coinbase/cdp-core
: For vanilla JavaScript/TypeScript or non-React frameworksverifyEmailOTP
while a user is already authenticated will result in an error and may leave the application in an inconsistent state.signOut()
method from @coinbase/cdp-core
or the AuthButton
component which handles sign out automatically.@coinbase/cdp-react
provides a pre-built AuthButton
component that handles the entire authentication flow with a single line of code.
AuthButton
component automatically:@coinbase/cdp-hooks
provides convenient hooks that handle state management and re-renders automatically.
@coinbase/cdp-core
package provides the low-level authentication primitives for maximum control over the user experience. This approach is ideal for non-React applications or when you need fine-grained control.
Evaluate your needs
Contact our team
Integration review
AuthButton
component which handles sign out automatically, or the useSignOut
hook:
verifyEmailOTP
when a user is already authenticated. This will result in an error and may leave your application in an inconsistent state.
When to use the AuthButton component
When to use React hooks
@coinbase/cdp-hooks
when:When to use direct methods
@coinbase/cdp-core
when:AuthButton