@skylabs-digital/react-identity-access 1.0.0 → 1.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +32 -0
- package/README.md +8 -8
- package/dist/index.d.ts +3 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.es.js +971 -946
- package/dist/index.es.js.map +1 -1
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/providers/AppProvider.d.ts +1 -17
- package/dist/providers/AppProvider.d.ts.map +1 -1
- package/dist/providers/AuthProvider.d.ts.map +1 -1
- package/dist/providers/FeatureFlagProvider.d.ts.map +1 -1
- package/dist/providers/SubscriptionProvider.d.ts.map +1 -1
- package/dist/providers/TenantProvider.d.ts +25 -5
- package/dist/providers/TenantProvider.d.ts.map +1 -1
- package/package.json +5 -2
package/CHANGELOG.md
ADDED
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
# 1.0.0 (2025-09-15)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Features
|
|
5
|
+
|
|
6
|
+
* add password visibility toggle and improve form accessibility ([5898190](https://github.com/skylabs-digital/react-identity-access/commit/589819002262a271898fb75cd0114bd732ecfb5b))
|
|
7
|
+
* add subscription and billing system with payment gateway integrations ([1ce6f38](https://github.com/skylabs-digital/react-identity-access/commit/1ce6f38a2c0cef883c7603478a278479007a45c2))
|
|
8
|
+
* add subscription page and route to navigation menu ([90a4b1b](https://github.com/skylabs-digital/react-identity-access/commit/90a4b1b65ff7a0c40638d4eb0e148ac95cd5a7cc))
|
|
9
|
+
* initialize e-commerce platform config with roles, plans and feature flags ([0879d16](https://github.com/skylabs-digital/react-identity-access/commit/0879d16ffcbc52d954bba3579a06b8ca9ce67210))
|
|
10
|
+
* initialize react-identity-access library with core components and documentation ([35dccaa](https://github.com/skylabs-digital/react-identity-access/commit/35dccaadb12e3103a7147c81e47209bf606249d7))
|
|
11
|
+
|
|
12
|
+
# Changelog
|
|
13
|
+
|
|
14
|
+
All notable changes to this project will be documented in this file.
|
|
15
|
+
|
|
16
|
+
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
|
17
|
+
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
18
|
+
|
|
19
|
+
## [Unreleased]
|
|
20
|
+
|
|
21
|
+
### Added
|
|
22
|
+
- Initial release of react-identity-access library
|
|
23
|
+
- Multi-tenancy support with AppProvider
|
|
24
|
+
- Authentication system with AuthProvider
|
|
25
|
+
- Authorization with role-based permissions
|
|
26
|
+
- Feature flags management
|
|
27
|
+
- Subscription management
|
|
28
|
+
- Session management with token handling
|
|
29
|
+
- Comprehensive TypeScript types
|
|
30
|
+
- React components for protected routes and forms
|
|
31
|
+
- API services for all domains
|
|
32
|
+
- Basic test suite with Vitest
|
package/README.md
CHANGED
|
@@ -17,11 +17,11 @@ A powerful, modern authentication and authorization library for React applicatio
|
|
|
17
17
|
## 📦 Installation
|
|
18
18
|
|
|
19
19
|
```bash
|
|
20
|
-
npm install react-identity-access
|
|
20
|
+
npm install @skylabs-digital/react-identity-access
|
|
21
21
|
# or
|
|
22
|
-
yarn add react-identity-access
|
|
22
|
+
yarn add @skylabs-digital/react-identity-access
|
|
23
23
|
# or
|
|
24
|
-
pnpm add react-identity-access
|
|
24
|
+
pnpm add @skylabs-digital/react-identity-access
|
|
25
25
|
```
|
|
26
26
|
|
|
27
27
|
## 🏃♂️ Quick Start
|
|
@@ -31,7 +31,7 @@ pnpm add react-identity-access
|
|
|
31
31
|
Wrap your application with the required providers:
|
|
32
32
|
|
|
33
33
|
```tsx
|
|
34
|
-
import { AppProvider, AuthProvider } from 'react-identity-access';
|
|
34
|
+
import { AppProvider, AuthProvider } from '@skylabs-digital/react-identity-access';
|
|
35
35
|
|
|
36
36
|
function App() {
|
|
37
37
|
return (
|
|
@@ -54,7 +54,7 @@ function App() {
|
|
|
54
54
|
### 2. Use Authentication
|
|
55
55
|
|
|
56
56
|
```tsx
|
|
57
|
-
import { useAuth } from 'react-identity-access';
|
|
57
|
+
import { useAuth } from '@skylabs-digital/react-identity-access';
|
|
58
58
|
|
|
59
59
|
function LoginComponent() {
|
|
60
60
|
const { login, logout, sessionManager } = useAuth();
|
|
@@ -86,7 +86,7 @@ function LoginComponent() {
|
|
|
86
86
|
### 3. Protect Components
|
|
87
87
|
|
|
88
88
|
```tsx
|
|
89
|
-
import { Protected } from 'react-identity-access';
|
|
89
|
+
import { Protected } from '@skylabs-digital/react-identity-access';
|
|
90
90
|
|
|
91
91
|
function AdminPanel() {
|
|
92
92
|
return (
|
|
@@ -159,7 +159,7 @@ The demo showcases:
|
|
|
159
159
|
|
|
160
160
|
```bash
|
|
161
161
|
# Clone the repository
|
|
162
|
-
git clone
|
|
162
|
+
git clone https://github.com/skylabs-digital/react-identity-access.git
|
|
163
163
|
cd react-identity-access
|
|
164
164
|
|
|
165
165
|
# Install dependencies
|
|
@@ -263,7 +263,7 @@ We welcome contributions! Please see our [Contributing Guide](./docs/contributin
|
|
|
263
263
|
|
|
264
264
|
- 📧 Email: support@skylabs.com
|
|
265
265
|
- 💬 Discord: [Join our community](https://discord.gg/skylabs)
|
|
266
|
-
- 🐛 Issues: [GitHub Issues](https://github.com/skylabs/react-identity-access/issues)
|
|
266
|
+
- 🐛 Issues: [GitHub Issues](https://github.com/skylabs-digital/react-identity-access/issues)
|
|
267
267
|
- 📖 Docs: [Documentation](./docs/)
|
|
268
268
|
|
|
269
269
|
## 🎯 Roadmap
|
package/dist/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { AppProvider, useApp, useApi
|
|
1
|
+
export { AppProvider, useApp, useApi } from './providers/AppProvider';
|
|
2
2
|
export type { AppConfig } from './providers/AppProvider';
|
|
3
3
|
export { AuthProvider, useAuth } from './providers/AuthProvider';
|
|
4
4
|
export type { AuthConfig, AuthContextValue } from './providers/AuthProvider';
|
|
@@ -7,7 +7,8 @@ export type { FeatureFlagConfig, FeatureFlagContextValue } from './providers/Fea
|
|
|
7
7
|
export type { FeatureFlag as FeatureFlagType } from './types/api';
|
|
8
8
|
export { SubscriptionProvider, useSubscription } from './providers/SubscriptionProvider';
|
|
9
9
|
export type { SubscriptionConfig, SubscriptionContextValue, } from './providers/SubscriptionProvider';
|
|
10
|
-
export { TenantProvider, useTenantSettings, useSettings } from './providers/TenantProvider';
|
|
10
|
+
export { TenantProvider, useTenant, useTenantSettings, useSettings, useTenantInfo } from './providers/TenantProvider';
|
|
11
|
+
export type { TenantConfig } from './providers/TenantProvider';
|
|
11
12
|
export { Protected } from './components/Protected';
|
|
12
13
|
export { ProtectedRoute } from './components/ProtectedRoute';
|
|
13
14
|
export { SubscriptionGuard } from './components/SubscriptionGuard';
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,WAAW,EAAE,MAAM,EAAE,MAAM,EAAE,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,WAAW,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,yBAAyB,CAAC;AACtE,YAAY,EAAE,SAAS,EAAE,MAAM,yBAAyB,CAAC;AACzD,OAAO,EAAE,YAAY,EAAE,OAAO,EAAE,MAAM,0BAA0B,CAAC;AACjE,YAAY,EAAE,UAAU,EAAE,gBAAgB,EAAE,MAAM,0BAA0B,CAAC;AAC7E,OAAO,EAAE,mBAAmB,EAAE,eAAe,EAAE,MAAM,iCAAiC,CAAC;AACvF,YAAY,EAAE,iBAAiB,EAAE,uBAAuB,EAAE,MAAM,iCAAiC,CAAC;AAClG,YAAY,EAAE,WAAW,IAAI,eAAe,EAAE,MAAM,aAAa,CAAC;AAClE,OAAO,EAAE,oBAAoB,EAAE,eAAe,EAAE,MAAM,kCAAkC,CAAC;AACzF,YAAY,EACV,kB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