Skip to main content

<AsgardeoUserProfile />

You're reading Identity & Access Management 7.2.0. The newest release is 7.3.0, and Cloud has the newest features. Go to the newest release

<AsgardeoUserProfile> displays the signed-in user's profile and lets the user edit it, using the WSO2 Identity Server Nuxt SDK (@asgardeo/nuxt).

Overview​

<AsgardeoUserProfile> reads the profile, its SCIM2 schemas, and updateProfile() from useUser(). The server fetches the profile while it renders the page. When the user saves a change, the component sends it to PATCH /api/auth/user/profile and updates the displayed profile.

note

<AsgardeoUserProfile> must render inside <AsgardeoRoot>. It needs preferences.user.fetchUserProfile to be true, which is the default.

Usage​

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

Basic usage​

<template>
<AsgardeoSignedIn>
<AsgardeoUserProfile />
</AsgardeoSignedIn>
</template>

Read-only profile with selected fields​

<template>
<AsgardeoUserProfile
title="My account"
:editable="false"
:show-fields="['name.givenName', 'name.familyName', 'emails']"
/>
</template>

Props​

PropTypeDefaultDescription
titlestring'Profile'Title of the profile card.
editablebooleantrueWhether the user can edit the fields.
cardLayoutbooleantrueWhether to render the profile in a card.
showFieldsstring[][]SCIM2 attribute names to show, such as name.givenName. When empty, all fields are shown.
hideFieldsstring[][]SCIM2 attribute names to hide.
classNamestring''CSS class for the root element.

Slots​

SlotSlot propsDescription
default{ profile, isLoading, error }Replaces the built-in profile view.
footer–Content to render below the profile.

Was this page helpful?