Skip to main content

<AsgardeoSignUpButton />

<AsgardeoSignUpButton> renders a button that starts the sign-up flow of the WSO2 Identity Platform Nuxt SDK (@asgardeo/nuxt).

Overview​

When the user clicks the button:

  • If you set signUpUrl (or NUXT_PUBLIC_ASGARDEO_SIGN_UP_URL), the button navigates to that URL. Use this to send users to a page in your app that renders <AsgardeoSignUp>, or to any other registration page.
  • Otherwise, the button navigates to the WSO2 Identity Platform self-registration page. The SDK builds its URL from baseUrl, clientId, and applicationId. If the SDK can't build that URL from baseUrl, the button navigates to the /sign-up page of your app.

The button shows a loading state while it navigates.

Usage​

The component is auto-registered, so you don't need to import it.

Basic usage​

<template>
<AsgardeoSignedOut>
<AsgardeoSignInButton />
<AsgardeoSignUpButton />
</AsgardeoSignedOut>
</template>

Without slot content, the button shows the text Sign Up.

Custom content​

<template>
<AsgardeoSignUpButton class="btn btn-primary">
<template #default="{ isLoading }">
{{ isLoading ? 'Opening…' : 'Create an account' }}
</template>
</AsgardeoSignUpButton>
</template>

Props​

<AsgardeoSignUpButton> has no props. The class and style attributes are applied to the button.

Slots​

SlotSlot propsDescription
default{ isLoading: boolean }Button content. Defaults to Sign Up.

Events​

EventPayloadDescription
clickMouseEventEmitted after the button starts the navigation.
errorunknownEmitted when starting sign-up fails.

Was this page helpful?