@ackplus/nest-auth-client 2.0.0-beta.8 → 2.0.1

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/README.md CHANGED
@@ -1,93 +1,133 @@
1
1
  # @ackplus/nest-auth-client
2
2
 
3
- The official JavaScript/TypeScript client SDK for `@ackplus/nest-auth`.
3
+ [![npm version](https://img.shields.io/npm/v/@ackplus/nest-auth-client.svg)](https://www.npmjs.com/package/@ackplus/nest-auth-client)
4
+ [![npm downloads](https://img.shields.io/npm/dm/@ackplus/nest-auth-client.svg)](https://www.npmjs.com/package/@ackplus/nest-auth-client)
5
+ [![license](https://img.shields.io/npm/l/@ackplus/nest-auth-client.svg)](https://www.npmjs.com/package/@ackplus/nest-auth-client)
4
6
 
5
- ## Features
7
+ Framework-agnostic JavaScript/TypeScript client for [`@ackplus/nest-auth`](https://www.npmjs.com/package/@ackplus/nest-auth). Zero peer dependencies. Works anywhere modern JS runs — browsers, Node 18+, React Native, Cloudflare Workers, Deno, Bun.
6
8
 
7
- - 🔄 **Framework Agnostic** - Works in React, Vue, Angular, React Native, or vanilla JS.
8
- - 💾 **Storage Adapters** - Built-in support for `localStorage`, `sessionStorage`, `AsyncStorage`, and Cookies.
9
- - 🔄 **Auto Refresh** - Automatically handles JWT refresh token rotation silently.
10
- - 📡 **HTTP Client** - Configurable HTTP client with interceptors.
11
- - 🔐 **Type-Safe** - Full TypeScript support sharing types with the backend.
9
+ > 📚 **Full documentation: [ack-solutions.github.io/nest-auth/docs/client](https://ack-solutions.github.io/nest-auth/docs/client/)**
12
10
 
13
- ## Installation
11
+ ---
12
+
13
+ ## Why use it
14
+
15
+ The official client for the `@ackplus/nest-auth` backend. Use it directly from Vue, Angular, Svelte, vanilla JS, or as the foundation under [`@ackplus/nest-auth-react`](https://www.npmjs.com/package/@ackplus/nest-auth-react).
16
+
17
+ It handles the parts of auth that are tedious to write by hand: token persistence, automatic refresh on 401 with concurrent-request deduplication, cookie/header mode switching, MFA flows, multi-tenant context, and an event subscription API.
18
+
19
+ ## Install
14
20
 
15
21
  ```bash
16
- npm install @ackplus/nest-auth-client
17
- # or
18
22
  pnpm add @ackplus/nest-auth-client
19
23
  ```
20
24
 
21
- ## Quick Start
25
+ **No peer dependencies.** TypeScript definitions ship in the package.
22
26
 
23
- ### 1. Initialize Client
27
+ ## Minimal example
24
28
 
25
- ```typescript
26
- import { createAuthClient } from '@ackplus/nest-auth-client';
29
+ ```ts
30
+ import { AuthClient } from '@ackplus/nest-auth-client';
27
31
 
28
- export const authClient = createAuthClient({
29
- apiUrl: 'http://localhost:3000',
30
- storage: 'local', // or 'cookie', 'memory'
32
+ const auth = new AuthClient({
33
+ baseUrl: 'https://api.example.com',
31
34
  });
32
- ```
33
35
 
34
- ### 2. Login
35
-
36
- ```typescript
37
- try {
38
- const { user, tokens } = await authClient.login({
39
- email: 'user@example.com',
40
- password: 'password123',
41
- });
42
-
43
- console.log('Logged in user:', user);
44
- } catch (error) {
45
- console.error('Login failed:', error);
46
- }
47
- ```
36
+ await auth.signup({
37
+ email: 'alice@example.com',
38
+ password: 'correct horse battery staple',
39
+ firstName: 'Alice', // any extra field flows through to UserRegisteredEvent
40
+ });
48
41
 
49
- ### 3. Make Authenticated Requests
42
+ await auth.login({
43
+ credentials: { email: 'alice@example.com', password: 'correct horse battery staple' },
44
+ });
50
45
 
51
- The client ensures the access token is attached and refreshed automatically using its internal HTTP client.
46
+ if (auth.getIsAuthenticated()) {
47
+ const user = await auth.getSessionUserData();
48
+ console.log('Hello', user.email);
49
+ }
50
+ ```
52
51
 
53
- ```typescript
54
- const response = await authClient.http.get('/profile');
52
+ ## What's included
53
+
54
+ | Capability | Notes |
55
+ | --- | --- |
56
+ | **Auth flows** | `signup`, `login`, `logout`, `logoutAll`, `refresh`, `passwordlessSend`, `switchTenant` |
57
+ | **MFA** | `send2fa`, `verify2fa`, `setupTotp`, `verifyTotpSetup`, `getMfaStatus`, recovery codes |
58
+ | **Password management** | `forgotPassword`, `verifyForgotPasswordOtp`, `resetPassword`, `changePassword` |
59
+ | **Email/phone verification** | `sendEmailVerification`, `verifyEmail`, `sendPhoneVerification`, `verifyPhone` |
60
+ | **Auto-refresh** | 401 → refresh → retry once, with `RefreshQueue` deduplication so N parallel 401s only fire **one** refresh |
61
+ | **Header or cookie mode** | `accessTokenType: 'header' \| 'cookie' \| null` (auto-detect) |
62
+ | **Storage adapters** | `MemoryStorage`, `LocalStorageAdapter`, `SessionStorageAdapter`, `CookieStorageAdapter`, custom |
63
+ | **HTTP adapters** | `FetchAdapter` (default) or `createAxiosAdapter(yourAxiosInstance)`, custom |
64
+ | **Events** | `onTokensSet`, `onTokenRefreshed`, `onTokensRemoved`, `onLogout`, `onError`, `onSessionVerified` |
65
+ | **Utilities** | `decodeJwt`, `isTokenExpired`, `hasRole`, `hasPermission`, `hasAnyAccess`, `hasAllAccess` |
66
+
67
+ ## Configuration
68
+
69
+ ```ts
70
+ new AuthClient({
71
+ baseUrl: 'https://api.example.com',
72
+ storage: new LocalStorageAdapter('myapp_'),
73
+ httpAdapter: new FetchAdapter(),
74
+ accessTokenType: 'header', // or 'cookie' or null (auto-detect)
75
+ autoRefresh: true,
76
+ refreshThreshold: 60, // seconds before expiry
77
+ onTokenRefreshed: (tokens) => { /* … */ },
78
+ onLogout: () => { window.location.href = '/login'; },
79
+ onError: (err) => console.error(err),
80
+ });
55
81
  ```
56
82
 
57
- ## Advanced Usage
83
+ [Full config reference →](https://ack-solutions.github.io/nest-auth/docs/client/config/)
58
84
 
59
- ### Custom Storage (e.g., React Native)
85
+ ## React Native
60
86
 
61
- ```typescript
62
- import { createAuthClient } from '@ackplus/nest-auth-client';
87
+ ```ts
63
88
  import AsyncStorage from '@react-native-async-storage/async-storage';
64
-
65
- const authClient = createAuthClient({
66
- apiUrl: 'https://api.myapp.com',
67
- storage: {
68
- msg: 'async-storage',
69
- getItem: AsyncStorage.getItem,
70
- setItem: AsyncStorage.setItem,
71
- removeItem: AsyncStorage.removeItem,
72
- },
89
+ import { AuthClient, type StorageAdapter } from '@ackplus/nest-auth-client';
90
+
91
+ const RNStorage: StorageAdapter = {
92
+ get: (k) => AsyncStorage.getItem(k),
93
+ set: (k, v) => AsyncStorage.setItem(k, v),
94
+ remove: (k) => AsyncStorage.removeItem(k),
95
+ clear: () => AsyncStorage.clear(),
96
+ };
97
+
98
+ export const auth = new AuthClient({
99
+ baseUrl: 'https://api.example.com',
100
+ storage: RNStorage,
73
101
  });
74
102
  ```
75
103
 
76
- ### Event Listening
104
+ ## Documentation
77
105
 
78
- ```typescript
79
- authClient.on('login', (user) => {
80
- console.log('User just logged in', user);
81
- });
106
+ | Section | What's there |
107
+ | --- | --- |
108
+ | [`AuthClient`](https://ack-solutions.github.io/nest-auth/docs/client/client/) | Every method with TS signatures and examples |
109
+ | [Config](https://ack-solutions.github.io/nest-auth/docs/client/config/) | All `AuthClientConfig` options |
110
+ | [Storage Adapters](https://ack-solutions.github.io/nest-auth/docs/client/storage-adapters/) | Built-ins and how to write your own |
111
+ | [HTTP Adapters](https://ack-solutions.github.io/nest-auth/docs/client/http-adapters/) | Fetch (default), axios, custom |
112
+ | [Events](https://ack-solutions.github.io/nest-auth/docs/client/events/) | Subscription API |
113
+ | [Utilities](https://ack-solutions.github.io/nest-auth/docs/client/utilities/) | JWT helpers, role/permission checks |
82
114
 
83
- authClient.on('logout', () => {
84
- console.log('User logged out');
85
- // Redirect to login page
86
- });
87
- ```
115
+ ## Companion packages
116
+
117
+ | Package | Use when |
118
+ | --- | --- |
119
+ | [`@ackplus/nest-auth`](https://www.npmjs.com/package/@ackplus/nest-auth) | The NestJS backend module |
120
+ | [`@ackplus/nest-auth-react`](https://www.npmjs.com/package/@ackplus/nest-auth-react) | React provider, hooks, guards, and Next.js App Router helpers (recommended for React) |
121
+ | [`@ackplus/nest-auth-contracts`](https://www.npmjs.com/package/@ackplus/nest-auth-contracts) | Shared TS types (already a transitive dep of this package) |
122
+
123
+ All four packages release together with the same version number. Pin them all to the same version.
124
+
125
+ ## Links
126
+
127
+ - 📚 [Documentation](https://ack-solutions.github.io/nest-auth/)
128
+ - 💬 [Issue Tracker](https://github.com/ack-solutions/nest-auth/issues)
129
+ - 📦 [GitHub Repository](https://github.com/ack-solutions/nest-auth)
88
130
 
89
- ## Related Packages
131
+ ## License
90
132
 
91
- - [@ackplus/nest-auth](../nest-auth) - The backend module.
92
- - [@ackplus/nest-auth-react](../nest-auth-react) - React hooks for this client.
93
- - [@ackplus/nest-auth-contracts](../nest-auth-contracts) - Shared types.
133
+ [MIT](https://github.com/ack-solutions/nest-auth/blob/main/LICENSE)
@@ -1,16 +1,16 @@
1
- import { IAuthUser as AuthUser, ITokenPair as TokenPair, ILoginRequest as LoginDto, ISignupRequest as SignupDto, IRefreshRequest as RefreshDto, IForgotPasswordRequest as ForgotPasswordDto, IResetPasswordWithTokenRequest as ResetPasswordDto, IVerifyEmailRequest as VerifyEmailDto, IVerifyForgotPasswordOtpRequest as VerifyForgotPasswordOtpDto, ISendEmailVerificationRequest as SendEmailVerificationDto, ISendPhoneVerificationRequest as SendPhoneVerificationDto, IVerifyPhoneRequest as VerifyPhoneDto, IChangePasswordRequest as ChangePasswordDto, IVerify2faRequest as Verify2faDto, IAuthResponse as AuthResponse, IMessageResponse as MessageResponse, IVerifyOtpResponse as VerifyOtpResponse, IVerify2faResponse as Verify2faResponse, ITotpSetupResponse, IVerifyTotpSetupRequest, IMfaStatusResponse, IMfaDevice, IToggleMfaRequest, ISwitchTenantRequest, INestAuthUserAccess, IPasswordlessSendRequest } from '@ackplus/nest-auth-contracts';
2
- import { AuthClientConfig, RequestOptions } from '../types/config.types';
3
- import { ClientSession } from '../types/auth.types';
1
+ import { ITokenPair, ISignupRequest, IRefreshRequest, IForgotPasswordRequest, IResetPasswordWithTokenRequest, IVerifyEmailRequest, IVerifyForgotPasswordOtpRequest, ISendEmailVerificationRequest, ISendPhoneVerificationRequest, IVerifyPhoneRequest, IChangePasswordRequest, IVerify2faRequest, IAuthResponse, IMessageResponse, IVerifyOtpResponse, IVerify2faResponse, ITotpSetupResponse, IVerifyTotpSetupRequest, IMfaStatusResponse, IMfaDevice, IToggleMfaRequest, ISwitchTenantRequest, IPasswordlessSendRequest, ISessionUserData, ILoginRequest } from '@ackplus/nest-auth-contracts';
2
+ import { AuthClientConfig, RequestOptions, GetAuthHeadersOptions } from '../types/config.types';
3
+ import { ClientSession, TokenState } from '../types/auth.types';
4
4
  import { AuthError } from '../types/auth.types';
5
+ import { type AxiosLikeInstance, type AttachOptions } from './http-attach';
5
6
  export declare class AuthClient {
6
7
  private config;
7
8
  private tokenManager;
8
9
  private events;
9
10
  private refreshQueue;
10
11
  private retryTracker;
11
- private user;
12
+ private isAuthenticated;
12
13
  private session;
13
- private userAccesses;
14
14
  private tenantId;
15
15
  private timeout;
16
16
  constructor(config: AuthClientConfig);
@@ -26,56 +26,71 @@ export declare class AuthClient {
26
26
  private handleError;
27
27
  private storeTokensOnly;
28
28
  private handleAuthResponse;
29
- login(dto: LoginDto, options?: RequestOptions): Promise<AuthResponse>;
30
- signup(dto: SignupDto, options?: RequestOptions): Promise<AuthResponse>;
31
- passwordlessSend(dto: IPasswordlessSendRequest, options?: RequestOptions): Promise<MessageResponse>;
29
+ login(dto: ILoginRequest, options?: RequestOptions): Promise<IAuthResponse>;
30
+ socialLogin(provider: 'google' | 'github' | 'facebook' | 'apple' | (string & {}), token: string, opts?: {
31
+ type?: 'idToken' | 'accessToken';
32
+ createUserIfNotExists?: boolean;
33
+ tenantId?: string;
34
+ nonce?: string;
35
+ name?: string;
36
+ extraCredentials?: Record<string, unknown>;
37
+ }, options?: RequestOptions): Promise<IAuthResponse>;
38
+ signup(dto: ISignupRequest, options?: RequestOptions): Promise<IAuthResponse>;
39
+ passwordlessSend(dto: IPasswordlessSendRequest, options?: RequestOptions): Promise<IMessageResponse>;
32
40
  private clearAuthState;
33
41
  logout(options?: RequestOptions): Promise<void>;
34
- logoutAll(options?: RequestOptions): Promise<MessageResponse>;
35
- refresh(dto?: RefreshDto, options?: RequestOptions): Promise<TokenPair>;
42
+ logoutAll(options?: RequestOptions): Promise<IMessageResponse>;
43
+ refresh(dto?: IRefreshRequest, options?: RequestOptions): Promise<ITokenPair | null>;
36
44
  verifySession(options?: RequestOptions): Promise<{
37
45
  valid: boolean;
38
46
  userId?: string;
39
47
  expiresAt?: string;
40
48
  }>;
41
- switchTenant(dto: ISwitchTenantRequest, options?: RequestOptions): Promise<AuthResponse>;
42
- forgotPassword(dto: ForgotPasswordDto, options?: RequestOptions): Promise<MessageResponse>;
43
- verifyForgotPasswordOtp(dto: VerifyForgotPasswordOtpDto, options?: RequestOptions): Promise<VerifyOtpResponse>;
44
- resetPassword(dto: ResetPasswordDto, options?: RequestOptions): Promise<MessageResponse>;
45
- changePassword(dto: ChangePasswordDto, options?: RequestOptions): Promise<MessageResponse>;
46
- sendEmailVerification(dto?: SendEmailVerificationDto, options?: RequestOptions): Promise<MessageResponse>;
47
- sendPhoneVerification(dto?: SendPhoneVerificationDto, options?: RequestOptions): Promise<MessageResponse>;
48
- verifyEmail(dto: VerifyEmailDto, options?: RequestOptions): Promise<MessageResponse>;
49
- verifyPhone(dto: VerifyPhoneDto, options?: RequestOptions): Promise<MessageResponse>;
50
- send2fa(method?: 'email' | 'phone', options?: RequestOptions): Promise<MessageResponse>;
51
- verify2fa(dto: Verify2faDto, options?: RequestOptions): Promise<Verify2faResponse>;
49
+ getSessionUserData(): Promise<ISessionUserData>;
50
+ switchTenant(dto: ISwitchTenantRequest, options?: RequestOptions): Promise<IAuthResponse>;
51
+ forgotPassword(dto: IForgotPasswordRequest, options?: RequestOptions): Promise<IMessageResponse>;
52
+ verifyForgotPasswordOtp(dto: IVerifyForgotPasswordOtpRequest, options?: RequestOptions): Promise<IVerifyOtpResponse>;
53
+ resetPassword(dto: IResetPasswordWithTokenRequest, options?: RequestOptions): Promise<IMessageResponse>;
54
+ changePassword(dto: IChangePasswordRequest, options?: RequestOptions): Promise<IMessageResponse>;
55
+ sendEmailVerification(dto?: ISendEmailVerificationRequest, options?: RequestOptions): Promise<IMessageResponse>;
56
+ sendPhoneVerification(dto?: ISendPhoneVerificationRequest, options?: RequestOptions): Promise<IMessageResponse>;
57
+ verifyEmail(dto: IVerifyEmailRequest, options?: RequestOptions): Promise<IMessageResponse>;
58
+ verifyPhone(dto: IVerifyPhoneRequest, options?: RequestOptions): Promise<IMessageResponse>;
59
+ send2fa(method?: 'email' | 'phone', options?: RequestOptions): Promise<IMessageResponse>;
60
+ verify2fa(dto: IVerify2faRequest, options?: RequestOptions): Promise<IVerify2faResponse>;
52
61
  setupTotp(options?: RequestOptions): Promise<ITotpSetupResponse>;
53
- verifyTotpSetup(dto: IVerifyTotpSetupRequest, options?: RequestOptions): Promise<MessageResponse>;
62
+ verifyTotpSetup(dto: IVerifyTotpSetupRequest, options?: RequestOptions): Promise<IMessageResponse>;
54
63
  getMfaStatus(options?: RequestOptions): Promise<IMfaStatusResponse>;
55
64
  listTotpDevices(options?: RequestOptions): Promise<IMfaDevice[]>;
56
- removeTotpDevice(deviceId: string, options?: RequestOptions): Promise<MessageResponse>;
57
- toggleMfa(dto: IToggleMfaRequest, options?: RequestOptions): Promise<MessageResponse>;
65
+ removeTotpDevice(deviceId: string, options?: RequestOptions): Promise<IMessageResponse>;
66
+ toggleMfa(dto: IToggleMfaRequest, options?: RequestOptions): Promise<IMessageResponse>;
58
67
  generateRecoveryCode(options?: RequestOptions): Promise<{
59
68
  code: string;
60
69
  }>;
61
- resetMfa(code: string, options?: RequestOptions): Promise<MessageResponse>;
70
+ resetMfa(code: string, options?: RequestOptions): Promise<IMessageResponse>;
62
71
  setMode(mode: 'header' | 'cookie'): void;
63
72
  getMode(): 'header' | 'cookie';
64
73
  setTenantId(id: string): void;
65
74
  getTenantId(): string | undefined;
66
- getUser(): AuthUser | null;
67
75
  getSession(): ClientSession | null;
68
- getUserAccesses(): INestAuthUserAccess[] | undefined;
69
- getTenantMemberships(): INestAuthUserAccess[] | undefined;
70
- isAuthenticated(): boolean;
76
+ getIsAuthenticated(): boolean;
71
77
  getAccessToken(): Promise<string | null>;
72
- onAuthStateChange(callback: (user: AuthUser | null) => void): () => void;
73
- onTokenRefreshed(callback: (tokens: TokenPair) => void): () => void;
78
+ onTokenRefreshed(callback: (tokens: ITokenPair | null) => void): () => void;
74
79
  onLogout(callback: () => void): () => void;
75
80
  onError(callback: (error: AuthError) => void): () => void;
76
- onTokensSet(callback: (tokens: TokenPair & {
81
+ onTokensSet(callback: (tokens: ITokenPair & {
77
82
  trustToken?: string;
78
83
  }) => void | Promise<void>): () => void;
79
84
  onTokensRemoved(callback: () => void | Promise<void>): () => void;
85
+ onSessionVerified(callback: () => void): () => void;
86
+ onRefreshSessionData(callback: () => void): () => void;
87
+ getAuthHeaders(opts?: GetAuthHeadersOptions): Promise<Record<string, string>>;
88
+ getAuthHeadersSync(opts?: GetAuthHeadersOptions): Record<string, string>;
89
+ shouldSendCookies(): boolean;
90
+ ready(): Promise<void>;
91
+ attachToAxios(instance: AxiosLikeInstance, opts?: AttachOptions): () => void;
92
+ attachToFetch(baseFetch?: typeof globalThis.fetch, opts?: AttachOptions): typeof globalThis.fetch;
93
+ getTokenState(): TokenState;
94
+ subscribeTokenState(listener: (state: TokenState) => void): () => void;
80
95
  }
81
96
  //# sourceMappingURL=auth-client.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"auth-client.d.ts","sourceRoot":"","sources":["../../src/client/auth-client.ts"],"names":[],"mappings":"AAKA,OAAO,EACH,SAAS,IAAI,QAAQ,EACrB,UAAU,IAAI,SAAS,EACvB,aAAa,IAAI,QAAQ,EACzB,cAAc,IAAI,SAAS,EAC3B,eAAe,IAAI,UAAU,EAC7B,sBAAsB,IAAI,iBAAiB,EAC3C,8BAA8B,IAAI,gBAAgB,EAClD,mBAAmB,IAAI,cAAc,EACrC,+BAA+B,IAAI,0BAA0B,EAE7D,6BAA6B,IAAI,wBAAwB,EACzD,6BAA6B,IAAI,wBAAwB,EACzD,mB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