
Security News
/Company News
Socket Is Sponsoring Composer and Packagist
Socket has joined the new Composer and Packagist sponsorship program as a launch sponsor, supporting the team that keeps PHP's package ecosystem secure.
@abpjs/identity-pro
Advanced tools
ABP Framework identity pro components for React - translated from @volo/abp.ng.identity
Enhanced user, role, and claim management UI components for ABP Framework in React
@abpjs/identity-pro provides enhanced identity management components for ABP-based React applications. It extends the basic identity module with advanced features like claim type management, user/role claims, and organization units.
This package is a React translation of the original @volo/abp.ng.identity Angular package, bringing pro-level identity management to React applications.
# Using npm
npm install @abpjs/identity-pro
# Using yarn
yarn add @abpjs/identity-pro
# Using pnpm
pnpm add @abpjs/identity-pro
This package requires the following peer dependencies:
npm install @abpjs/core @abpjs/theme-shared @abpjs/permission-management @chakra-ui/react @emotion/react react-icons react-router-dom
import { RolesComponent, UsersComponent, ClaimsComponent } from '@abpjs/identity-pro';
import { Tabs, TabList, TabPanels, Tab, TabPanel } from '@chakra-ui/react';
function IdentityProManagement() {
return (
<Tabs>
<TabList>
<Tab>Users</Tab>
<Tab>Roles</Tab>
<Tab>Claim Types</Tab>
</TabList>
<TabPanels>
<TabPanel>
<UsersComponent
onUserCreated={(user) => console.log('User created:', user)}
onUserDeleted={(id) => console.log('User deleted:', id)}
/>
</TabPanel>
<TabPanel>
<RolesComponent
onRoleCreated={(role) => console.log('Role created:', role)}
onRoleDeleted={(id) => console.log('Role deleted:', id)}
/>
</TabPanel>
<TabPanel>
<ClaimsComponent
onClaimTypeCreated={(claim) => console.log('Claim type created:', claim)}
onClaimTypeDeleted={(id) => console.log('Claim type deleted:', id)}
/>
</TabPanel>
</TabPanels>
</Tabs>
);
}
import { useUsers, useRoles, useClaims } from '@abpjs/identity-pro';
import { useEffect } from 'react';
function CustomIdentityPage() {
const { users, fetchUsers } = useUsers();
const { roles, fetchRoles } = useRoles();
const { claimTypes, fetchClaimTypes } = useClaims();
useEffect(() => {
fetchUsers();
fetchRoles();
fetchClaimTypes();
}, [fetchUsers, fetchRoles, fetchClaimTypes]);
return (
<div>
<h2>Users: {users.length}</h2>
<h2>Roles: {roles.length}</h2>
<h2>Claim Types: {claimTypes.length}</h2>
</div>
);
}
Complete user management component with enhanced pro features.
import { UsersComponent } from '@abpjs/identity-pro';
<UsersComponent
onUserCreated={(user) => console.log('Created:', user)}
onUserUpdated={(user) => console.log('Updated:', user)}
onUserDeleted={(id) => console.log('Deleted:', id)}
/>
Features:
Complete role management component with claim support.
import { RolesComponent } from '@abpjs/identity-pro';
<RolesComponent
onRoleCreated={(role) => console.log('Created:', role)}
onRoleUpdated={(role) => console.log('Updated:', role)}
onRoleDeleted={(id) => console.log('Deleted:', id)}
/>
Features:
Claim type management component.
import { ClaimsComponent } from '@abpjs/identity-pro';
<ClaimsComponent
onClaimTypeCreated={(claim) => console.log('Created:', claim)}
onClaimTypeUpdated={(claim) => console.log('Updated:', claim)}
onClaimTypeDeleted={(id) => console.log('Deleted:', id)}
/>
Features:
Hook for managing users with full CRUD and pagination support.
import { useUsers } from '@abpjs/identity-pro';
const {
users, // Array of users
totalCount, // Total user count
selectedUser, // Currently selected user
selectedUserRoles, // Roles of selected user
isLoading, // Loading state
error, // Error message
fetchUsers, // Fetch users with optional params
getUserById, // Get single user
getUserRoles, // Get user's roles
createUser, // Create new user
updateUser, // Update existing user
deleteUser, // Delete user
reset, // Reset all state
} = useUsers();
Hook for managing roles with full CRUD support.
import { useRoles } from '@abpjs/identity-pro';
const {
roles, // Array of roles
totalCount, // Total role count
selectedRole, // Currently selected role
isLoading, // Loading state
error, // Error message
fetchRoles, // Fetch all roles
getRoleById, // Get single role
createRole, // Create new role
updateRole, // Update existing role
deleteRole, // Delete role
reset, // Reset all state
} = useRoles();
Hook for managing claim types.
import { useClaims } from '@abpjs/identity-pro';
const {
claimTypes, // Array of claim types
totalCount, // Total claim type count
selectedClaimType, // Currently selected claim type
isLoading, // Loading state
error, // Error message
fetchClaimTypes, // Fetch claim types with optional params
getClaimTypeById, // Get single claim type
createClaimType, // Create new claim type
updateClaimType, // Update existing claim type
deleteClaimType, // Delete claim type
reset, // Reset all state
} = useClaims();
Combined hook for managing users and roles.
import { useIdentity } from '@abpjs/identity-pro';
const {
roles,
users,
fetchRoles,
fetchUsers,
} = useIdentity();
Service class for identity pro API operations.
import { IdentityProService } from '@abpjs/identity-pro';
import { useRestService } from '@abpjs/core';
function MyComponent() {
const restService = useRestService();
const service = new IdentityProService(restService);
// User operations
await service.getUsers({ maxResultCount: 10, skipCount: 0 });
await service.getUserById(userId);
await service.createUser(userData);
await service.updateUser(userId, userData);
await service.deleteUser(userId);
// Role operations
await service.getRoles();
await service.createRole(roleData);
// Claim type operations
await service.getClaimTypes();
await service.createClaimType(claimData);
}
interface UserItem {
id: string;
tenantId: string;
userName: string;
name: string;
surname: string;
email: string;
emailConfirmed: boolean;
phoneNumber: string;
phoneNumberConfirmed: boolean;
twoFactorEnabled: boolean;
lockoutEnabled: boolean;
isLockedOut: boolean;
concurrencyStamp: string;
}
interface RoleItem {
id: string;
name: string;
isDefault: boolean;
isPublic: boolean;
isStatic: boolean;
concurrencyStamp: string;
}
interface ClaimType {
id: string;
name: string;
required: boolean;
isStatic: boolean;
regex: string;
regexDescription: string;
description: string;
valueType: ClaimValueType;
valueTypeAsString: string;
}
enum ClaimValueType {
String = 0,
Int = 1,
Boolean = 2,
DateTime = 3,
}
This package respects ABP's identity pro permissions:
| Permission | Description |
|---|---|
AbpIdentity.Users | View users |
AbpIdentity.Users.Create | Create users |
AbpIdentity.Users.Update | Update users |
AbpIdentity.Users.Delete | Delete users |
AbpIdentity.Users.ManagePermissions | Manage user permissions |
AbpIdentity.Roles | View roles |
AbpIdentity.Roles.Create | Create roles |
AbpIdentity.Roles.Update | Update roles |
AbpIdentity.Roles.Delete | Delete roles |
AbpIdentity.Roles.ManagePermissions | Manage role permissions |
AbpIdentity.ClaimTypes | View claim types |
AbpIdentity.ClaimTypes.Create | Create claim types |
AbpIdentity.ClaimTypes.Update | Update claim types |
AbpIdentity.ClaimTypes.Delete | Delete claim types |
This package is part of the ABP React monorepo. Contributions are welcome!
LGPL-3.0 - See LICENSE for details.
FAQs
ABP Framework identity pro components for React - translated from @volo/abp.ng.identity
The npm package @abpjs/identity-pro receives a total of 30 weekly downloads. As such, @abpjs/identity-pro popularity was classified as not popular.
We found that @abpjs/identity-pro demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
/Company News
Socket has joined the new Composer and Packagist sponsorship program as a launch sponsor, supporting the team that keeps PHP's package ecosystem secure.

Research
/Security News
Benign-looking npm packages split malicious functionality across a dependency chain that deploys a cross-platform RAT targeting Alibaba developers.

Research
/Security News
Two Joyfill npm beta releases contain an import-time implant that uses blockchain transactions to retrieve a remote-access trojan.