X Enterprises
nuxt-x-auth-nile

OAuthButton

Single OAuth provider sign-in button with built-in provider icons for Nile Auth.

OAuthButton

The XAuthOAuthButton component renders a single sign-in button for one OAuth provider. Prefer listing buttons via xAuth.oauthProviders on login/signup rather than mounting this by hand. Built-in labels exist for Google, GitHub, Microsoft, Apple, Discord, Facebook, Twitter, LinkedIn, GitLab, and Slack. It calls loginWithOAuth with the provider id when clicked. On signup, parent forms disable OAuth until required consents are checked.

Components

<XAuthOAuthButton />

Pass a provider id to render a styled button for that provider.

<XAuthOAuthButton provider="google" />

Props

PropTypeDefaultDescription
providerOAuthProviderrequiredOAuth provider id (e.g. 'google', 'github', 'apple')
variant'solid' | 'outline' | 'soft' | 'subtle' | 'ghost' | 'link''outline'Nuxt UI button variant
color'primary' | 'secondary' | 'success' | 'info' | 'warning' | 'error' | 'neutral''neutral'Nuxt UI button color

The button manages its own loading state while loginWithProvider is in flight. On success the SDK navigates the browser through the provider round-trip; the /auth/handler/* route completes the sign-in.


AI Context

component: XAuthOAuthButton
package: "@xenterprises/nuxt-x-auth-nile"
use-when: Render a single OAuth provider sign-in button with Nile Auth
Copyright © 2026