@scaleway/auth-scw 1.0.0 → 1.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.
@@ -51,4 +51,4 @@ type CookieConfigType = {
51
51
  secure: boolean;
52
52
  };
53
53
  //#endregion
54
- export { AudienceIdType, AuthScwContextType, ConfigAuthProvider, CookieConfigType, EncodedJWT, OnError };
54
+ export { AudienceIdType, AuthScwContextType, ConfigAuthProvider, ConfigurationClientAPIs, CookieConfigType, EncodedJWT, IamV1alpha1API, IamV1alpha1UnauthenticatedAPI, OnError };
@@ -21,4 +21,4 @@ declare const AuthScwProvider: ({
21
21
  onError
22
22
  }: AuthProviderParamType) => import("react").JSX.Element;
23
23
  //#endregion
24
- export { AuthScwProvider, useAuthScw };
24
+ export { AuthProviderParamType, AuthScwProvider, useAuthScw };
@@ -100,28 +100,29 @@ const AuthScwProvider = ({ clientSettings, IamV1Alpha1, IamUnauthenticatedV1Alph
100
100
  const setAudienceId = useCallback((audienceId) => {
101
101
  setCurrentAudienceId(audienceId);
102
102
  }, []);
103
+ const value = useMemo(() => ({
104
+ audienceId: currentAudienceId ?? void 0,
105
+ authenticated: isAuthenticated,
106
+ decodeToken,
107
+ encodeToken,
108
+ getJWT,
109
+ getJwtToken,
110
+ jti,
111
+ logout,
112
+ setAudienceId,
113
+ setJWT
114
+ }), [
115
+ getJWT,
116
+ getJwtToken,
117
+ logout,
118
+ setJWT,
119
+ setAudienceId,
120
+ currentAudienceId,
121
+ isAuthenticated,
122
+ jti
123
+ ]);
103
124
  return /* @__PURE__ */ jsx(AuthScwContext, {
104
- value: useMemo(() => ({
105
- audienceId: currentAudienceId ?? void 0,
106
- authenticated: isAuthenticated,
107
- decodeToken,
108
- encodeToken,
109
- getJWT,
110
- getJwtToken,
111
- jti,
112
- logout,
113
- setAudienceId,
114
- setJWT
115
- }), [
116
- getJWT,
117
- getJwtToken,
118
- logout,
119
- setJWT,
120
- setAudienceId,
121
- currentAudienceId,
122
- isAuthenticated,
123
- jti
124
- ]),
125
+ value,
125
126
  children
126
127
  });
127
128
  };
@@ -1 +1,2 @@
1
- import { AuthScwProvider, useAuthScw } from "./AuthScwProvider.js";
1
+ import { AuthScwProvider, useAuthScw } from "./AuthScwProvider.js";
2
+ export { AuthScwProvider, useAuthScw };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@scaleway/auth-scw",
3
- "version": "1.0.0",
3
+ "version": "1.0.1",
4
4
  "description": "Auth Scaleway",
5
5
  "homepage": "https://github.com/scaleway/scaleway-lib/tree/main/packages/auth-scw",
6
6
  "bugs": {
@@ -25,22 +25,21 @@
25
25
  "publishConfig": {
26
26
  "access": "public"
27
27
  },
28
+ "dependencies": {
29
+ "cookie": "2.0.1",
30
+ "date-fns": "4.4.0",
31
+ "zod": "4.4.3"
32
+ },
28
33
  "devDependencies": {
29
34
  "@scaleway/sdk-client": "2.4.1",
30
35
  "@scaleway/sdk-iam": "2.9.4",
31
36
  "@types/react": "19.2.17",
32
- "cookie": "2.0.0",
33
- "date-fns": "4.4.0",
34
- "react": "19.2.7",
35
- "zod": "4.4.3"
37
+ "react": "19.2.7"
36
38
  },
37
39
  "peerDependencies": {
38
40
  "@scaleway/sdk-client": "2.4.1",
39
41
  "@scaleway/sdk-iam": "2.9.4",
40
- "cookie": "2.0.0",
41
- "date-fns": "4.4.0",
42
- "react": "19.2.7",
43
- "zod": "4.4.3"
42
+ "react": ">=18.0"
44
43
  },
45
44
  "scripts": {
46
45
  "typecheck": "tsc --noEmit",