@s8lab/sso-client 1.1.2 → 1.1.4
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/dist/context/AuthContext.d.ts +1 -1
- package/dist/index.cjs +12 -12
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +1454 -1496
- package/dist/index.js.map +1 -1
- package/dist/types/index.d.ts +5 -7
- package/package.json +1 -1
package/dist/types/index.d.ts
CHANGED
|
@@ -44,7 +44,6 @@ export interface AuthTokens {
|
|
|
44
44
|
}
|
|
45
45
|
export interface AuthState {
|
|
46
46
|
user: User | null;
|
|
47
|
-
tokens: AuthTokens | null;
|
|
48
47
|
isLoading: boolean;
|
|
49
48
|
isAuthenticated: boolean;
|
|
50
49
|
}
|
|
@@ -84,21 +83,20 @@ export interface AuthProviderProps {
|
|
|
84
83
|
* Base URL of your SSO API server.
|
|
85
84
|
* Expected endpoints:
|
|
86
85
|
* GET /auth/config (with X-Project-Id header)
|
|
87
|
-
* POST /auth/login
|
|
88
|
-
* POST /auth/signup
|
|
89
|
-
* POST /auth/logout
|
|
86
|
+
* POST /auth/login (server sets auth cookie, returns { user })
|
|
87
|
+
* POST /auth/signup (server sets auth cookie, returns { user })
|
|
88
|
+
* POST /auth/logout (server clears auth cookie)
|
|
90
89
|
* POST /auth/forgot-password
|
|
91
90
|
* POST /auth/magic-link
|
|
92
91
|
* GET /auth/me
|
|
93
92
|
*/
|
|
94
93
|
apiUrl: string;
|
|
95
|
-
/** Project ID sent as X-Project-Id header
|
|
94
|
+
/** Project ID sent as X-Project-Id header on every request */
|
|
96
95
|
projectId: string;
|
|
97
|
-
/** localStorage key prefix for tokens. Default: "sso" */
|
|
98
|
-
storageKeyPrefix?: string;
|
|
99
96
|
/**
|
|
100
97
|
* Custom fetch handler — override for custom headers, interceptors, etc.
|
|
101
98
|
* Must return the parsed JSON response (or undefined for 204).
|
|
99
|
+
* Should forward credentials (cookies) to the server.
|
|
102
100
|
*/
|
|
103
101
|
fetcher?: <T>(url: string, init: RequestInit) => Promise<T>;
|
|
104
102
|
}
|
package/package.json
CHANGED