<AsgardeoSignUpButton />
<AsgardeoSignUpButton> renders a button that starts the sign-up flow of the WSO2 Identity Server Nuxt SDK (@asgardeo/nuxt).
Overview¶
When the user clicks the button:
- If you set
signUpUrl(orNUXT_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 Server self-registration page. The SDK builds its URL from
baseUrl,clientId, andapplicationId. If the SDK can't build that URL frombaseUrl, the button navigates to the/sign-uppage 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¶
| Slot | Slot props | Description |
|---|---|---|
default |
{ isLoading: boolean } |
Button content. Defaults to Sign Up. |
Events¶
| Event | Payload | Description |
|---|---|---|
click |
MouseEvent |
Emitted after the button starts the navigation. |
error |
unknown |
Emitted when starting sign-up fails. |