User Management
This section covers functionality related to user profile management and retrieving information about the currently authenticated user. These features help create personalized experiences and integrate user identity into your application.
Display User Profile Management
mimeeqAuth.mountUserProfile()
warning
This method is deprecated. Please use the unified mount method or the mmq-auth component instead, as described in the "Recommended Alternative" section below.
This method displays a comprehensive user profile management interface in a Mimeeq modal dialog. It provides access to the user's personal information, password management, and account settings. The interface is only accessible to authenticated users.
Business Value
- Self-service Account Management - Reduces administrative overhead by allowing users to update their own information
- Password Security - Enables users to maintain strong credentials by changing passwords regularly
- Personalization Hub - Creates a central location for users to manage their experience preferences
- Consistent User Experience - Provides a professionally designed interface that matches your product configurator
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
| locale | string | en | Language code for localizing the interface |
Usage Example
// Add a "My Account" button to your site
document.getElementById('my-account-button').addEventListener('click', () => {
// Check if user is logged in first
mimeeqAuth.authorization.getUserData().then((user) => {
if (user && !('name' in user)) {
// User is logged in, show profile
mimeeqAuth.mountUserProfile({
locale: 'de', // German localization
});
} else {
// User is not logged in, show login form instead
mimeeqAuth.mountLogin({
onLoginSuccess: () => {
// After successful login, show profile
mimeeqAuth.mountUserProfile();
},
});
}
});
});
Recommended Alternative
// Using the unified mount method (recommended approach)
const mountRoot = await window.mimeeqAuth.mount({
CDNPath: window.mimeeqEmbedEnv.CDNPath,
baseURL: window.mimeeqEmbedEnv.APIPath,
customerId: 'customer123',
node: document.getElementById('auth-container'),
uid: 'user-profile',
});
mountRoot.render({
embedType: 'USER_PROFILE',
locale: 'de', // German localization
});