@multiplatform.one/keycloak 1.0.9 → 1.0.10

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.
Files changed (68) hide show
  1. package/dist/cjs/index.js +0 -1
  2. package/dist/cjs/index.js.map +1 -1
  3. package/dist/cjs/index.native.js +0 -2
  4. package/dist/cjs/index.native.js.map +1 -1
  5. package/dist/cjs/state.js +1 -1
  6. package/dist/cjs/state.js.map +1 -1
  7. package/dist/cjs/state.native.js +1 -1
  8. package/dist/cjs/state.native.js.map +1 -1
  9. package/dist/esm/hooks/useTokensFromQuery/index.native.mjs +2 -0
  10. package/dist/esm/index.js +0 -1
  11. package/dist/esm/index.js.map +1 -1
  12. package/dist/esm/index.mjs +0 -1
  13. package/dist/esm/index.native.js +0 -1
  14. package/dist/esm/index.native.js.map +1 -1
  15. package/dist/esm/keycloak/keycloak.native.mjs +84 -0
  16. package/dist/esm/provider/AuthProvider/AuthProvider.native.mjs +111 -0
  17. package/dist/esm/session/session.native.mjs +7 -0
  18. package/dist/esm/state.js +1 -1
  19. package/dist/esm/state.js.map +1 -1
  20. package/dist/esm/state.mjs +1 -1
  21. package/dist/esm/state.native.js +1 -1
  22. package/dist/esm/state.native.js.map +2 -2
  23. package/dist/jsx/hooks/useTokensFromQuery/index.native.mjs +2 -0
  24. package/dist/jsx/index.js +0 -1
  25. package/dist/jsx/index.js.map +1 -1
  26. package/dist/jsx/index.mjs +0 -1
  27. package/dist/jsx/index.native.js +0 -1
  28. package/dist/jsx/index.native.js.map +1 -1
  29. package/dist/jsx/keycloak/keycloak.native.mjs +84 -0
  30. package/dist/jsx/provider/AuthProvider/AuthProvider.native.mjs +111 -0
  31. package/dist/jsx/session/session.native.mjs +7 -0
  32. package/dist/jsx/state.js +1 -1
  33. package/dist/jsx/state.js.map +1 -1
  34. package/dist/jsx/state.mjs +1 -1
  35. package/dist/jsx/state.native.js +1 -1
  36. package/dist/jsx/state.native.js.map +2 -2
  37. package/package.json +26 -38
  38. package/src/index.ts +0 -1
  39. package/src/state.ts +1 -1
  40. package/types/Authenticated.d.ts +0 -20
  41. package/types/Authenticated.d.ts.map +1 -1
  42. package/types/index.d.ts +0 -1
  43. package/types/index.d.ts.map +1 -1
  44. package/types/provider/AfterAuth.d.ts +0 -20
  45. package/types/provider/AfterAuth.d.ts.map +1 -1
  46. package/types/provider/AuthProvider/AuthProvider.d.ts +0 -20
  47. package/types/provider/AuthProvider/AuthProvider.d.ts.map +1 -1
  48. package/types/provider/AuthProvider/AuthProvider.native.d.ts +0 -20
  49. package/types/provider/AuthProvider/AuthProvider.native.d.ts.map +1 -1
  50. package/types/provider/KeycloakProvider.d.ts +0 -20
  51. package/types/provider/KeycloakProvider.d.ts.map +1 -1
  52. package/dist/cjs/apollo.js +0 -64
  53. package/dist/cjs/apollo.js.map +0 -6
  54. package/dist/cjs/apollo.native.js +0 -95
  55. package/dist/cjs/apollo.native.js.map +0 -6
  56. package/dist/esm/apollo.js +0 -49
  57. package/dist/esm/apollo.js.map +0 -6
  58. package/dist/esm/apollo.mjs +0 -44
  59. package/dist/esm/apollo.native.js +0 -74
  60. package/dist/esm/apollo.native.js.map +0 -6
  61. package/dist/jsx/apollo.js +0 -49
  62. package/dist/jsx/apollo.js.map +0 -6
  63. package/dist/jsx/apollo.mjs +0 -44
  64. package/dist/jsx/apollo.native.js +0 -74
  65. package/dist/jsx/apollo.native.js.map +0 -6
  66. package/src/apollo.ts +0 -95
  67. package/types/apollo.d.ts +0 -5
  68. package/types/apollo.d.ts.map +0 -1
@@ -1,5 +1,5 @@
1
- import { createStateStore } from "multiplatform.one/zustand";
2
1
  import { MultiPlatform } from "multiplatform.one";
2
+ import { createStateStore } from "@multiplatform.one/zustand";
3
3
  const persist = MultiPlatform.isIframe || !MultiPlatform.isNext && !MultiPlatform.isServer,
4
4
  {
5
5
  useStore
@@ -1,5 +1,5 @@
1
- import { createStateStore } from "multiplatform.one/zustand";
2
1
  import { MultiPlatform } from "multiplatform.one";
2
+ import { createStateStore } from "@multiplatform.one/zustand";
3
3
  var persist = MultiPlatform.isIframe || !MultiPlatform.isNext && !MultiPlatform.isServer, useStore = createStateStore("auth", {
4
4
  idToken: "",
5
5
  refreshToken: "",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../src/Users/clayrisser/Projects/.bitspur/multiplatform.one/packages/keycloak/src/state.ts"],
4
- "mappings": "AAqBA,SAASA,wBAAwB;AACjC,SAASC,qBAAqB;AAEvB,IAAMC,UAAUD,cAAcE,YAAa,CAACF,cAAcG,UAAU,CAACH,cAAcI,UAElFC,WAAaN,iBACnB,QACA;EACEO,SAAS;EACTC,cAAc;EACdC,OAAO;AACT,GACAC,QACA;EAAER;AAAQ,CAAA,EARJI;AAWD,SAASK,eAAAA;AACd,SAAOL,SAAAA;AACT;",
5
- "names": ["createStateStore", "MultiPlatform", "persist", "isIframe", "isNext", "isServer", "useStore", "idToken", "refreshToken", "token", "undefined", "useAuthState"]
4
+ "mappings": "AAqBA,SAASA,qBAAqB;AAC9B,SAASC,wBAAwB;AAE1B,IAAMC,UAAUF,cAAcG,YAAa,CAACH,cAAcI,UAAU,CAACJ,cAAcK,UAElFC,WAAaL,iBACnB,QACA;EACEM,SAAS;EACTC,cAAc;EACdC,OAAO;AACT,GACAC,QACA;EAAER;AAAQ,CAAA,EARJI;AAWD,SAASK,eAAAA;AACd,SAAOL,SAAAA;AACT;",
5
+ "names": ["MultiPlatform", "createStateStore", "persist", "isIframe", "isNext", "isServer", "useStore", "idToken", "refreshToken", "token", "undefined", "useAuthState"]
6
6
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@multiplatform.one/keycloak",
3
- "version": "1.0.9",
3
+ "version": "1.0.10",
4
4
  "description": "keycloak client for multiplatform.one ecosystem",
5
5
  "main": "dist/cjs",
6
6
  "module": "dist/esm",
@@ -18,7 +18,8 @@
18
18
  "import": "./dist/esm/routes.js",
19
19
  "require": "./dist/cjs/routes.js",
20
20
  "types": "./dist/esm/routes.d.ts"
21
- }
21
+ },
22
+ "./package.json": "./package.json"
22
23
  },
23
24
  "author": "BitSpur",
24
25
  "sideEffects": false,
@@ -43,30 +44,31 @@
43
44
  },
44
45
  "peerDependencies": {
45
46
  "@react-native-async-storage/async-storage": "1.21.0",
46
- "multiplatform.one": "1.0.7",
47
+ "multiplatform.one": "1.0.8",
47
48
  "next": "^13.0.5",
48
49
  "react": "18.2.0",
49
- "react-native": "0.73.6"
50
+ "react-native": "0.74.1"
50
51
  },
51
52
  "devDependencies": {
52
- "@react-native-async-storage/async-storage": "1.21.0",
53
- "@tamagui/build": "^1.95.1",
53
+ "@react-native-async-storage/async-storage": "1.23.1",
54
+ "@tamagui/build": "^1.99.1",
55
+ "@testing-library/jest-dom": "^6.4.5",
56
+ "@testing-library/react": "^15.0.7",
54
57
  "@types/eslint": "^8.56.10",
55
58
  "@types/jest": "^29.5.12",
56
59
  "@types/lodash.camelcase": "^4.3.9",
57
60
  "@types/lodash.startcase": "^4.4.9",
58
61
  "@types/react": "^18.3.1",
59
62
  "@types/react-native": "^0.73.0",
60
- "cspell": "^8.7.0",
61
- "eslint": "~8.56.0",
62
- "jest": "^29.7.0",
63
- "jest-sonar-reporter": "^2.0.0",
64
- "multiplatform.one": "1.0.7",
63
+ "@vitejs/plugin-react": "^4.3.0",
64
+ "cspell": "^8.8.3",
65
+ "multiplatform.one": "1.0.8",
65
66
  "next": "^14.2.3",
66
- "prettier": "^3.2.5",
67
67
  "react": "18.2.0",
68
- "react-native": "0.73.6",
69
- "typescript": "5.3.3"
68
+ "react-native": "0.74.1",
69
+ "typescript": "~5.3.3",
70
+ "vitest": "^1.6.0",
71
+ "vitest-react-native": "^0.1.5"
70
72
  },
71
73
  "engines": {
72
74
  "node": ">=6.0.0"
@@ -74,29 +76,15 @@
74
76
  "eslintIgnore": [
75
77
  "lib"
76
78
  ],
77
- "jest": {
78
- "testRegex": "((/(tests|__tests__)((/|/[^_.\n][^/\n]*(/[^_.\n][^/\n]+)*/)[^_.\n][^/\n]*))|((/|/.*/)(([^_.\n][^/\n]*.(spec|test))|(spec|test)))).[jt]sx?$",
79
- "testEnvironment": "node",
80
- "preset": "ts-jest",
81
- "verbose": true,
82
- "testPathIgnorePatterns": [
83
- "<rootDir>/dist/",
84
- "<rootDir>/lib/"
85
- ],
86
- "setupFilesAfterEnv": [
87
- "<rootDir>/tests/_setup.ts"
88
- ]
89
- },
90
- "jestSonar": {
91
- "reportPath": "node_modules",
92
- "reportFile": "test-report.xml",
93
- "indent": 4
94
- },
95
79
  "dependencies": {
96
- "@apollo/client": "^3.10.1",
97
- "expo-auth-session": "^5.5.1",
98
- "expo-crypto": "^12.8.1",
99
- "keycloak-js": "^24.0.3",
100
- "next-auth": "^4.24.7"
80
+ "@apollo/client": "^3.10.4",
81
+ "expo-auth-session": "^5.5.2",
82
+ "expo-crypto": "^13.0.2",
83
+ "keycloak-js": "^24.0.4",
84
+ "next-auth": "^4.24.7",
85
+ "@multiplatform.one/zustand": "1.0.1"
86
+ },
87
+ "scripts": {
88
+ "build": "rm -rf dist types 2>/dev/null && tamagui-build"
101
89
  }
102
- }
90
+ }
package/src/index.ts CHANGED
@@ -20,7 +20,6 @@
20
20
  */
21
21
 
22
22
  export * from './Authenticated';
23
- export * from './apollo';
24
23
  export * from './authConfig';
25
24
  export * from './hooks';
26
25
  export * from './keycloak';
package/src/state.ts CHANGED
@@ -19,8 +19,8 @@
19
19
  * limitations under the License.
20
20
  */
21
21
 
22
- import { createStateStore } from 'multiplatform.one/zustand';
23
22
  import { MultiPlatform } from 'multiplatform.one';
23
+ import { createStateStore } from '@multiplatform.one/zustand';
24
24
 
25
25
  export const persist = MultiPlatform.isIframe || (!MultiPlatform.isNext && !MultiPlatform.isServer);
26
26
 
@@ -1,23 +1,3 @@
1
- /**
2
- * File: /src/Authenticated.tsx
3
- * Project: @multiplatform.one/keycloak
4
- * File Created: 22-06-2023 10:07:56
5
- * Author: Clay Risser
6
- * -----
7
- * BitSpur (c) Copyright 2021 - 2023
8
- *
9
- * Licensed under the Apache License, Version 2.0 (the "License");
10
- * you may not use this file except in compliance with the License.
11
- * You may obtain a copy of the License at
12
- *
13
- * http://www.apache.org/licenses/LICENSE-2.0
14
- *
15
- * Unless required by applicable law or agreed to in writing, software
16
- * distributed under the License is distributed on an "AS IS" BASIS,
17
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
18
- * See the License for the specific language governing permissions and
19
- * limitations under the License.
20
- */
21
1
  import React, { ComponentType, PropsWithChildren } from 'react';
22
2
  export interface AuthenticatedProps extends PropsWithChildren {
23
3
  disabled?: boolean;
@@ -1 +1 @@
1
- {"version":3,"file":"Authenticated.d.ts","sourceRoot":"","sources":["../src/Authenticated.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAIH,OAAO,KAAK,EAAE,EAAE,aAAa,EAAE,iBAAiB,EAAa,MAAM,OAAO,CAAC;AAU3E,MAAM,WAAW,kBAAmB,SAAQ,iBAAiB;IAC3D,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,gBAAgB,CAAC,EAAE,aAAa,CAAC;IACjC,kBAAkB,CAAC,EAAE,aAAa,CAAC;CACpC;AAED,wBAAgB,aAAa,CAAC,EAAE,QAAQ,EAAE,QAAQ,EAAE,kBAAkB,EAAE,gBAAgB,EAAE,EAAE,kBAAkB,qBAuB7G;AAED,wBAAgB,iBAAiB,CAAC,CAAC,SAAS,MAAM,EAAE,SAAS,EAAE,aAAa,CAAC,CAAC,CAAC,WAC9D,CAAC,uBAKjB"}
1
+ {"version":3,"file":"Authenticated.d.ts","sourceRoot":"","sources":["../src/Authenticated.tsx"],"names":[],"mappings":"AAuBA,OAAO,KAAK,EAAE,EAAE,aAAa,EAAE,iBAAiB,EAAa,MAAM,OAAO,CAAC;AAU3E,MAAM,WAAW,kBAAmB,SAAQ,iBAAiB;IAC3D,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,gBAAgB,CAAC,EAAE,aAAa,CAAC;IACjC,kBAAkB,CAAC,EAAE,aAAa,CAAC;CACpC;AAED,wBAAgB,aAAa,CAAC,EAAE,QAAQ,EAAE,QAAQ,EAAE,kBAAkB,EAAE,gBAAgB,EAAE,EAAE,kBAAkB,qBAuB7G;AAED,wBAAgB,iBAAiB,CAAC,CAAC,SAAS,MAAM,EAAE,SAAS,EAAE,aAAa,CAAC,CAAC,CAAC,WAC9D,CAAC,uBAKjB"}
package/types/index.d.ts CHANGED
@@ -1,5 +1,4 @@
1
1
  export * from './Authenticated';
2
- export * from './apollo';
3
2
  export * from './authConfig';
4
3
  export * from './hooks';
5
4
  export * from './keycloak';
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAqBA,cAAc,iBAAiB,CAAC;AAChC,cAAc,UAAU,CAAC;AACzB,cAAc,cAAc,CAAC;AAC7B,cAAc,SAAS,CAAC;AACxB,cAAc,YAAY,CAAC;AAC3B,cAAc,YAAY,CAAC;AAC3B,cAAc,WAAW,CAAC;AAC1B,cAAc,SAAS,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAqBA,cAAc,iBAAiB,CAAC;AAChC,cAAc,cAAc,CAAC;AAC7B,cAAc,SAAS,CAAC;AACxB,cAAc,YAAY,CAAC;AAC3B,cAAc,YAAY,CAAC;AAC3B,cAAc,WAAW,CAAC;AAC1B,cAAc,SAAS,CAAC"}
@@ -1,23 +1,3 @@
1
- /**
2
- * File: /src/provider/AfterAuth.tsx
3
- * Project: @multiplatform.one/keycloak
4
- * File Created: 10-01-2024 12:41:33
5
- * Author: Clay Risser
6
- * -----
7
- * BitSpur (c) Copyright 2021 - 2024
8
- *
9
- * Licensed under the Apache License, Version 2.0 (the "License");
10
- * you may not use this file except in compliance with the License.
11
- * You may obtain a copy of the License at
12
- *
13
- * http://www.apache.org/licenses/LICENSE-2.0
14
- *
15
- * Unless required by applicable law or agreed to in writing, software
16
- * distributed under the License is distributed on an "AS IS" BASIS,
17
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
18
- * See the License for the specific language governing permissions and
19
- * limitations under the License.
20
- */
21
1
  import React from 'react';
22
2
  import type { PropsWithChildren } from 'react';
23
3
  export interface AfterAuthProps extends PropsWithChildren {
@@ -1 +1 @@
1
- {"version":3,"file":"AfterAuth.d.ts","sourceRoot":"","sources":["../../src/provider/AfterAuth.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAIH,OAAO,KAAoB,MAAM,OAAO,CAAC;AACzC,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,OAAO,CAAC;AAK/C,MAAM,WAAW,cAAe,SAAQ,iBAAiB;CAAG;AAI5D,wBAAgB,SAAS,CAAC,EAAE,QAAQ,EAAE,EAAE,cAAc,qBA+BrD"}
1
+ {"version":3,"file":"AfterAuth.d.ts","sourceRoot":"","sources":["../../src/provider/AfterAuth.tsx"],"names":[],"mappings":"AAuBA,OAAO,KAAoB,MAAM,OAAO,CAAC;AACzC,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,OAAO,CAAC;AAK/C,MAAM,WAAW,cAAe,SAAQ,iBAAiB;CAAG;AAI5D,wBAAgB,SAAS,CAAC,EAAE,QAAQ,EAAE,EAAE,cAAc,qBA+BrD"}
@@ -1,23 +1,3 @@
1
- /**
2
- * File: /src/provider/AuthProvider/AuthProvider.tsx
3
- * Project: @multiplatform.one/keycloak
4
- * File Created: 09-01-2024 11:29:20
5
- * Author: Clay Risser
6
- * -----
7
- * BitSpur (c) Copyright 2021 - 2024
8
- *
9
- * Licensed under the Apache License, Version 2.0 (the "License");
10
- * you may not use this file except in compliance with the License.
11
- * You may obtain a copy of the License at
12
- *
13
- * http://www.apache.org/licenses/LICENSE-2.0
14
- *
15
- * Unless required by applicable law or agreed to in writing, software
16
- * distributed under the License is distributed on an "AS IS" BASIS,
17
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
18
- * See the License for the specific language governing permissions and
19
- * limitations under the License.
20
- */
21
1
  import React from 'react';
22
2
  import type { KeycloakInitOptions } from 'keycloak-js';
23
3
  import type { KeycloakConfig } from '../../keycloak';
@@ -1 +1 @@
1
- {"version":3,"file":"AuthProvider.d.ts","sourceRoot":"","sources":["../../../src/provider/AuthProvider/AuthProvider.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAKH,OAAO,KAAuC,MAAM,OAAO,CAAC;AAC5D,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,aAAa,CAAC;AACvD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAC;AACrD,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,OAAO,CAAC;AAC/C,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,iBAAiB,CAAC;AAW5D,MAAM,WAAW,iBAAkB,SAAQ,iBAAiB;IAC1D,cAAc,EAAE,cAAc,CAAC;IAC/B,mBAAmB,CAAC,EAAE,mBAAmB,CAAC;IAC1C,eAAe,CAAC,EAAE,IAAI,CAAC,oBAAoB,EAAE,UAAU,CAAC,CAAC;CAC1D;AAID,MAAM,WAAW,MAAM,CAAC,CAAC,GAAG,OAAO;IACjC,OAAO,CAAC,EAAE,MAAM,GAAG,CAAC,CAAC;IACrB,YAAY,CAAC,EAAE,MAAM,GAAG,CAAC,CAAC;IAC1B,KAAK,CAAC,EAAE,MAAM,GAAG,CAAC,CAAC;CACpB;AAED,wBAAgB,YAAY,CAAC,EAAE,QAAQ,EAAE,eAAe,EAAE,mBAAmB,EAAE,cAAc,EAAE,EAAE,iBAAiB,qBA8NjH;AAUD,MAAM,WAAW,aAAa;IAC5B,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB"}
1
+ {"version":3,"file":"AuthProvider.d.ts","sourceRoot":"","sources":["../../../src/provider/AuthProvider/AuthProvider.tsx"],"names":[],"mappings":"AAwBA,OAAO,KAAuC,MAAM,OAAO,CAAC;AAC5D,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,aAAa,CAAC;AACvD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAC;AACrD,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,OAAO,CAAC;AAC/C,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,iBAAiB,CAAC;AAW5D,MAAM,WAAW,iBAAkB,SAAQ,iBAAiB;IAC1D,cAAc,EAAE,cAAc,CAAC;IAC/B,mBAAmB,CAAC,EAAE,mBAAmB,CAAC;IAC1C,eAAe,CAAC,EAAE,IAAI,CAAC,oBAAoB,EAAE,UAAU,CAAC,CAAC;CAC1D;AAID,MAAM,WAAW,MAAM,CAAC,CAAC,GAAG,OAAO;IACjC,OAAO,CAAC,EAAE,MAAM,GAAG,CAAC,CAAC;IACrB,YAAY,CAAC,EAAE,MAAM,GAAG,CAAC,CAAC;IAC1B,KAAK,CAAC,EAAE,MAAM,GAAG,CAAC,CAAC;CACpB;AAED,wBAAgB,YAAY,CAAC,EAAE,QAAQ,EAAE,eAAe,EAAE,mBAAmB,EAAE,cAAc,EAAE,EAAE,iBAAiB,qBA8NjH;AAUD,MAAM,WAAW,aAAa;IAC5B,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB"}
@@ -1,23 +1,3 @@
1
- /**
2
- * File: /src/provider/AuthProvider/AuthProvider.native.tsx
3
- * Project: @multiplatform.one/keycloak
4
- * File Created: 09-01-2024 11:29:20
5
- * Author: Clay Risser
6
- * -----
7
- * BitSpur (c) Copyright 2021 - 2024
8
- *
9
- * Licensed under the Apache License, Version 2.0 (the "License");
10
- * you may not use this file except in compliance with the License.
11
- * You may obtain a copy of the License at
12
- *
13
- * http://www.apache.org/licenses/LICENSE-2.0
14
- *
15
- * Unless required by applicable law or agreed to in writing, software
16
- * distributed under the License is distributed on an "AS IS" BASIS,
17
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
18
- * See the License for the specific language governing permissions and
19
- * limitations under the License.
20
- */
21
1
  import React from 'react';
22
2
  import type { AuthProviderProps } from './AuthProvider';
23
3
  export declare function AuthProvider({ children, keycloakConfig }: AuthProviderProps): React.JSX.Element;
@@ -1 +1 @@
1
- {"version":3,"file":"AuthProvider.native.d.ts","sourceRoot":"","sources":["../../../src/provider/AuthProvider/AuthProvider.native.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,OAAO,KAAoD,MAAM,OAAO,CAAC;AACzE,OAAO,KAAK,EAAE,iBAAiB,EAAU,MAAM,gBAAgB,CAAC;AAWhE,wBAAgB,YAAY,CAAC,EAAE,QAAQ,EAAE,cAAc,EAAE,EAAE,iBAAiB,qBAgK3E"}
1
+ {"version":3,"file":"AuthProvider.native.d.ts","sourceRoot":"","sources":["../../../src/provider/AuthProvider/AuthProvider.native.tsx"],"names":[],"mappings":"AAqBA,OAAO,KAAoD,MAAM,OAAO,CAAC;AACzE,OAAO,KAAK,EAAE,iBAAiB,EAAU,MAAM,gBAAgB,CAAC;AAWhE,wBAAgB,YAAY,CAAC,EAAE,QAAQ,EAAE,cAAc,EAAE,EAAE,iBAAiB,qBAgK3E"}
@@ -1,23 +1,3 @@
1
- /**
2
- * File: /src/provider/KeycloakProvider.tsx
3
- * Project: @multiplatform.one/keycloak
4
- * File Created: 10-01-2024 13:56:05
5
- * Author: Clay Risser
6
- * -----
7
- * BitSpur (c) Copyright 2021 - 2024
8
- *
9
- * Licensed under the Apache License, Version 2.0 (the "License");
10
- * you may not use this file except in compliance with the License.
11
- * You may obtain a copy of the License at
12
- *
13
- * http://www.apache.org/licenses/LICENSE-2.0
14
- *
15
- * Unless required by applicable law or agreed to in writing, software
16
- * distributed under the License is distributed on an "AS IS" BASIS,
17
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
18
- * See the License for the specific language governing permissions and
19
- * limitations under the License.
20
- */
21
1
  import React from 'react';
22
2
  import type { AuthConfig } from '../authConfig';
23
3
  import type { PropsWithChildren } from 'react';
@@ -1 +1 @@
1
- {"version":3,"file":"KeycloakProvider.d.ts","sourceRoot":"","sources":["../../src/provider/KeycloakProvider.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,OAAO,KAAkB,MAAM,OAAO,CAAC;AACvC,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAChD,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,OAAO,CAAC;AAC/C,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAIzC,MAAM,WAAW,qBAAsB,SAAQ,iBAAiB,EAAE,UAAU;IAC1E,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB;AAED,wBAAgB,gBAAgB,CAAC,EAC/B,OAAO,EACP,QAAQ,EACR,QAAQ,EACR,KAAK,EACL,QAAQ,EACR,cAAc,EACd,KAAK,EACL,OAAO,GACR,EAAE,qBAAqB,qBAqBvB"}
1
+ {"version":3,"file":"KeycloakProvider.d.ts","sourceRoot":"","sources":["../../src/provider/KeycloakProvider.tsx"],"names":[],"mappings":"AAqBA,OAAO,KAAkB,MAAM,OAAO,CAAC;AACvC,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAChD,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,OAAO,CAAC;AAC/C,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAIzC,MAAM,WAAW,qBAAsB,SAAQ,iBAAiB,EAAE,UAAU;IAC1E,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB;AAED,wBAAgB,gBAAgB,CAAC,EAC/B,OAAO,EACP,QAAQ,EACR,QAAQ,EACR,KAAK,EACL,QAAQ,EACR,cAAc,EACd,KAAK,EACL,OAAO,GACR,EAAE,qBAAqB,qBAqBvB"}
@@ -1,64 +0,0 @@
1
- var __defProp = Object.defineProperty;
2
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
3
- var __getOwnPropNames = Object.getOwnPropertyNames;
4
- var __hasOwnProp = Object.prototype.hasOwnProperty;
5
- var __export = (target, all) => {
6
- for (var name in all)
7
- __defProp(target, name, { get: all[name], enumerable: !0 });
8
- }, __copyProps = (to, from, except, desc) => {
9
- if (from && typeof from == "object" || typeof from == "function")
10
- for (let key of __getOwnPropNames(from))
11
- !__hasOwnProp.call(to, key) && key !== except && __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
12
- return to;
13
- };
14
- var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: !0 }), mod);
15
- var apollo_exports = {};
16
- __export(apollo_exports, {
17
- useAuthMutation: () => useAuthMutation,
18
- useAuthQuery: () => useAuthQuery,
19
- useAuthSubscription: () => useAuthSubscription
20
- });
21
- module.exports = __toCommonJS(apollo_exports);
22
- var import_keycloak = require("./keycloak"), import_client = require("@apollo/client");
23
- function useAuthQuery(query, options) {
24
- const keycloak = (0, import_keycloak.useKeycloak)();
25
- return (0, import_client.useQuery)(query, {
26
- ...options,
27
- skip: options?.skip || !keycloak?.authenticated || !keycloak.token,
28
- context: {
29
- ...options?.context,
30
- headers: {
31
- ...options?.context?.headers || {},
32
- authorization: `Bearer ${keycloak?.token}`
33
- }
34
- }
35
- });
36
- }
37
- function useAuthMutation(mutation, options) {
38
- const keycloak = (0, import_keycloak.useKeycloak)();
39
- return (0, import_client.useMutation)(mutation, {
40
- ...options,
41
- context: {
42
- ...options?.context,
43
- headers: {
44
- ...options?.context?.headers || {},
45
- authorization: `Bearer ${keycloak?.token}`
46
- }
47
- }
48
- });
49
- }
50
- function useAuthSubscription(subscription, options) {
51
- const keycloak = (0, import_keycloak.useKeycloak)();
52
- return (0, import_client.useSubscription)(subscription, {
53
- ...options,
54
- skip: options?.skip || !keycloak?.authenticated || !keycloak.token,
55
- context: {
56
- ...options?.context,
57
- headers: {
58
- ...options?.context?.headers || {},
59
- authorization: `Bearer ${keycloak?.token}`
60
- }
61
- }
62
- });
63
- }
64
- //# sourceMappingURL=apollo.js.map
@@ -1,6 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": ["../../src/apollo.ts"],
4
- "mappings": ";;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAqBA,sBAA4B,uBAC5B,gBAAuD;AAgBhD,SAAS,aACd,OACA,SACgC;AAChC,QAAM,eAAW,6BAAY;AAC7B,aAAO,wBAAS,OAAO;AAAA,IACrB,GAAG;AAAA,IACH,MAAM,SAAS,QAAQ,CAAC,UAAU,iBAAiB,CAAC,SAAS;AAAA,IAC7D,SAAS;AAAA,MACP,GAAG,SAAS;AAAA,MACZ,SAAS;AAAA,QACP,GAAI,SAAS,SAAS,WAAW,CAAC;AAAA,QAClC,eAAe,UAAU,UAAU,KAAK;AAAA,MAC1C;AAAA,IACF;AAAA,EACF,CAAC;AACH;AAEO,SAAS,gBAMd,UACA,SACoD;AACpD,QAAM,eAAW,6BAAY;AAC7B,aAAO,2BAAY,UAAU;AAAA,IAC3B,GAAG;AAAA,IACH,SAAS;AAAA,MACP,GAAG,SAAS;AAAA,MACZ,SAAS;AAAA,QACP,GAAK,SAAS,SAA4B,WAAW,CAAC;AAAA,QACtD,eAAe,UAAU,UAAU,KAAK;AAAA,MAC1C;AAAA,IACF;AAAA,EACF,CAAC;AACH;AAEO,SAAS,oBACd,cACA,SACuC;AACvC,QAAM,eAAW,6BAAY;AAC7B,aAAO,+BAAgB,cAAc;AAAA,IACnC,GAAG;AAAA,IACH,MAAM,SAAS,QAAQ,CAAC,UAAU,iBAAiB,CAAC,SAAS;AAAA,IAC7D,SAAS;AAAA,MACP,GAAG,SAAS;AAAA,MACZ,SAAS;AAAA,QACP,GAAK,SAAS,SAA4B,WAAW,CAAC;AAAA,QACtD,eAAe,UAAU,UAAU,KAAK;AAAA,MAC1C;AAAA,IACF;AAAA,EACF,CAAC;AACH;",
5
- "names": []
6
- }
@@ -1,95 +0,0 @@
1
- var __defProp = Object.defineProperty;
2
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
3
- var __getOwnPropNames = Object.getOwnPropertyNames;
4
- var __hasOwnProp = Object.prototype.hasOwnProperty;
5
- var __export = (target, all) => {
6
- for (var name in all)
7
- __defProp(target, name, { get: all[name], enumerable: !0 });
8
- }, __copyProps = (to, from, except, desc) => {
9
- if (from && typeof from == "object" || typeof from == "function")
10
- for (let key of __getOwnPropNames(from))
11
- !__hasOwnProp.call(to, key) && key !== except && __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
12
- return to;
13
- };
14
- var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: !0 }), mod);
15
- var apollo_exports = {};
16
- __export(apollo_exports, {
17
- useAuthMutation: () => useAuthMutation,
18
- useAuthQuery: () => useAuthQuery,
19
- useAuthSubscription: () => useAuthSubscription
20
- });
21
- module.exports = __toCommonJS(apollo_exports);
22
- var import_keycloak = require("./keycloak"), import_client = require("@apollo/client");
23
- function _define_property(obj, key, value) {
24
- return key in obj ? Object.defineProperty(obj, key, {
25
- value,
26
- enumerable: !0,
27
- configurable: !0,
28
- writable: !0
29
- }) : obj[key] = value, obj;
30
- }
31
- function _object_spread(target) {
32
- for (var i = 1; i < arguments.length; i++) {
33
- var source = arguments[i] != null ? arguments[i] : {}, ownKeys2 = Object.keys(source);
34
- typeof Object.getOwnPropertySymbols == "function" && (ownKeys2 = ownKeys2.concat(Object.getOwnPropertySymbols(source).filter(function(sym) {
35
- return Object.getOwnPropertyDescriptor(source, sym).enumerable;
36
- }))), ownKeys2.forEach(function(key) {
37
- _define_property(target, key, source[key]);
38
- });
39
- }
40
- return target;
41
- }
42
- function ownKeys(object, enumerableOnly) {
43
- var keys = Object.keys(object);
44
- if (Object.getOwnPropertySymbols) {
45
- var symbols = Object.getOwnPropertySymbols(object);
46
- enumerableOnly && (symbols = symbols.filter(function(sym) {
47
- return Object.getOwnPropertyDescriptor(object, sym).enumerable;
48
- })), keys.push.apply(keys, symbols);
49
- }
50
- return keys;
51
- }
52
- function _object_spread_props(target, source) {
53
- return source = source ?? {}, Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function(key) {
54
- Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
55
- }), target;
56
- }
57
- function useAuthQuery(query, options) {
58
- var _options_context, keycloak = (0, import_keycloak.useKeycloak)();
59
- return (0, import_client.useQuery)(query, _object_spread_props(_object_spread({}, options), {
60
- skip: (options == null ? void 0 : options.skip) || !(keycloak != null && keycloak.authenticated) || !keycloak.token,
61
- context: _object_spread_props(_object_spread({}, options == null ? void 0 : options.context), {
62
- headers: _object_spread_props(_object_spread({}, (options == null || (_options_context = options.context) === null || _options_context === void 0 ? void 0 : _options_context.headers) || {}), {
63
- authorization: "Bearer ".concat(keycloak == null ? void 0 : keycloak.token)
64
- })
65
- })
66
- }));
67
- }
68
- function useAuthMutation(mutation, options) {
69
- var _options_context, keycloak = (0, import_keycloak.useKeycloak)();
70
- return (0, import_client.useMutation)(mutation, _object_spread_props(_object_spread({}, options), {
71
- context: _object_spread_props(_object_spread({}, options == null ? void 0 : options.context), {
72
- headers: _object_spread_props(_object_spread({}, (options == null || (_options_context = options.context) === null || _options_context === void 0 ? void 0 : _options_context.headers) || {}), {
73
- authorization: "Bearer ".concat(keycloak == null ? void 0 : keycloak.token)
74
- })
75
- })
76
- }));
77
- }
78
- function useAuthSubscription(subscription, options) {
79
- var _options_context, keycloak = (0, import_keycloak.useKeycloak)();
80
- return (0, import_client.useSubscription)(subscription, _object_spread_props(_object_spread({}, options), {
81
- skip: (options == null ? void 0 : options.skip) || !(keycloak != null && keycloak.authenticated) || !keycloak.token,
82
- context: _object_spread_props(_object_spread({}, options == null ? void 0 : options.context), {
83
- headers: _object_spread_props(_object_spread({}, (options == null || (_options_context = options.context) === null || _options_context === void 0 ? void 0 : _options_context.headers) || {}), {
84
- authorization: "Bearer ".concat(keycloak == null ? void 0 : keycloak.token)
85
- })
86
- })
87
- }));
88
- }
89
- // Annotate the CommonJS export names for ESM import in node:
90
- 0 && (module.exports = {
91
- useAuthMutation,
92
- useAuthQuery,
93
- useAuthSubscription
94
- });
95
- //# sourceMappingURL=apollo.js.map
@@ -1,6 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": ["../../src/Users/clayrisser/Projects/.bitspur/multiplatform.one/packages/keycloak/src/apollo.ts"],
4
- "mappings": ";;;;;;;;;;;;;;AAAA;;;;;;;AAqBA,sBAA4B,uBAC5B,gBAAuD;AAHtD,SAAA,iBAAA,KAAA,KAAA,OAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAmBM,SAASA,aACdC,OACAC,SAA+D;MASrDA,kBAPJC,eAAWC,6BAAAA;AACjB,aAAOC,wBAASJ,OAAO,qBAAA,eAAA,CAAA,GAClBC,OAAAA,GAAAA;IACHI,OAAMJ,WAAAA,OAAAA,SAAAA,QAASI,SAAQ,EAACH,YAAAA,QAAAA,SAAUI,kBAAiB,CAACJ,SAASK;IAC7DC,SAAS,qBAAA,eAAA,CAAA,GACJP,WAAAA,OAAAA,SAAAA,QAASO,OAAO,GAAA;MACnBC,SAAS,qBAAA,eAAA,CAAA,IACHR,WAAAA,SAAAA,mBAAAA,QAASO,aAAO,QAAhBP,qBAAAA,SAAAA,SAAAA,iBAAkBQ,YAAW,CAAC,CAAA,GAAA;QAClCC,eAAgB,UAAyB,OAAhBR,YAAAA,OAAAA,SAAAA,SAAUK,KAAK;;;;AAIhD;AAEO,SAASI,gBAMdC,UACAX,SAAoF;MAQzEA,kBANLC,eAAWC,6BAAAA;AACjB,aAAOU,2BAAYD,UAAU,qBAAA,eAAA,CAAA,GACxBX,OAAAA,GAAAA;IACHO,SAAS,qBAAA,eAAA,CAAA,GACJP,WAAAA,OAAAA,SAAAA,QAASO,OAAO,GAAA;MACnBC,SAAS,qBAAA,eAAA,CAAA,IACFR,WAAAA,SAAAA,mBAAAA,QAASO,aAAO,QAAhBP,qBAAAA,SAAAA,SAAAA,iBAAqCQ,YAAW,CAAC,CAAA,GAAA;QACtDC,eAAgB,UAAyB,OAAhBR,YAAAA,OAAAA,SAAAA,SAAUK,KAAK;;;;AAIhD;AAEO,SAASO,oBACdC,cACAd,SAAsE;MAS3DA,kBAPLC,eAAWC,6BAAAA;AACjB,aAAOa,+BAAgBD,cAAc,qBAAA,eAAA,CAAA,GAChCd,OAAAA,GAAAA;IACHI,OAAMJ,WAAAA,OAAAA,SAAAA,QAASI,SAAQ,EAACH,YAAAA,QAAAA,SAAUI,kBAAiB,CAACJ,SAASK;IAC7DC,SAAS,qBAAA,eAAA,CAAA,GACJP,WAAAA,OAAAA,SAAAA,QAASO,OAAO,GAAA;MACnBC,SAAS,qBAAA,eAAA,CAAA,IACFR,WAAAA,SAAAA,mBAAAA,QAASO,aAAO,QAAhBP,qBAAAA,SAAAA,SAAAA,iBAAqCQ,YAAW,CAAC,CAAA,GAAA;QACtDC,eAAgB,UAAyB,OAAhBR,YAAAA,OAAAA,SAAAA,SAAUK,KAAK;;;;AAIhD;",
5
- "names": ["useAuthQuery", "query", "options", "keycloak", "useKeycloak", "useQuery", "skip", "authenticated", "token", "context", "headers", "authorization", "useAuthMutation", "mutation", "useMutation", "useAuthSubscription", "subscription", "useSubscription"]
6
- }
@@ -1,49 +0,0 @@
1
- import { useKeycloak } from "./keycloak";
2
- import { useQuery, useMutation, useSubscription } from "@apollo/client";
3
- function useAuthQuery(query, options) {
4
- const keycloak = useKeycloak();
5
- return useQuery(query, {
6
- ...options,
7
- skip: options?.skip || !keycloak?.authenticated || !keycloak.token,
8
- context: {
9
- ...options?.context,
10
- headers: {
11
- ...options?.context?.headers || {},
12
- authorization: `Bearer ${keycloak?.token}`
13
- }
14
- }
15
- });
16
- }
17
- function useAuthMutation(mutation, options) {
18
- const keycloak = useKeycloak();
19
- return useMutation(mutation, {
20
- ...options,
21
- context: {
22
- ...options?.context,
23
- headers: {
24
- ...options?.context?.headers || {},
25
- authorization: `Bearer ${keycloak?.token}`
26
- }
27
- }
28
- });
29
- }
30
- function useAuthSubscription(subscription, options) {
31
- const keycloak = useKeycloak();
32
- return useSubscription(subscription, {
33
- ...options,
34
- skip: options?.skip || !keycloak?.authenticated || !keycloak.token,
35
- context: {
36
- ...options?.context,
37
- headers: {
38
- ...options?.context?.headers || {},
39
- authorization: `Bearer ${keycloak?.token}`
40
- }
41
- }
42
- });
43
- }
44
- export {
45
- useAuthMutation,
46
- useAuthQuery,
47
- useAuthSubscription
48
- };
49
- //# sourceMappingURL=apollo.js.map
@@ -1,6 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": ["../../src/apollo.ts"],
4
- "mappings": "AAqBA,SAAS,mBAAmB;AAC5B,SAAS,UAAU,aAAa,uBAAuB;AAgBhD,SAAS,aACd,OACA,SACgC;AAChC,QAAM,WAAW,YAAY;AAC7B,SAAO,SAAS,OAAO;AAAA,IACrB,GAAG;AAAA,IACH,MAAM,SAAS,QAAQ,CAAC,UAAU,iBAAiB,CAAC,SAAS;AAAA,IAC7D,SAAS;AAAA,MACP,GAAG,SAAS;AAAA,MACZ,SAAS;AAAA,QACP,GAAI,SAAS,SAAS,WAAW,CAAC;AAAA,QAClC,eAAe,UAAU,UAAU,KAAK;AAAA,MAC1C;AAAA,IACF;AAAA,EACF,CAAC;AACH;AAEO,SAAS,gBAMd,UACA,SACoD;AACpD,QAAM,WAAW,YAAY;AAC7B,SAAO,YAAY,UAAU;AAAA,IAC3B,GAAG;AAAA,IACH,SAAS;AAAA,MACP,GAAG,SAAS;AAAA,MACZ,SAAS;AAAA,QACP,GAAK,SAAS,SAA4B,WAAW,CAAC;AAAA,QACtD,eAAe,UAAU,UAAU,KAAK;AAAA,MAC1C;AAAA,IACF;AAAA,EACF,CAAC;AACH;AAEO,SAAS,oBACd,cACA,SACuC;AACvC,QAAM,WAAW,YAAY;AAC7B,SAAO,gBAAgB,cAAc;AAAA,IACnC,GAAG;AAAA,IACH,MAAM,SAAS,QAAQ,CAAC,UAAU,iBAAiB,CAAC,SAAS;AAAA,IAC7D,SAAS;AAAA,MACP,GAAG,SAAS;AAAA,MACZ,SAAS;AAAA,QACP,GAAK,SAAS,SAA4B,WAAW,CAAC;AAAA,QACtD,eAAe,UAAU,UAAU,KAAK;AAAA,MAC1C;AAAA,IACF;AAAA,EACF,CAAC;AACH;",
5
- "names": []
6
- }
@@ -1,44 +0,0 @@
1
- import { useKeycloak } from "./keycloak/index.mjs";
2
- import { useQuery, useMutation, useSubscription } from "@apollo/client";
3
- function useAuthQuery(query, options) {
4
- const keycloak = useKeycloak();
5
- return useQuery(query, {
6
- ...options,
7
- skip: options?.skip || !keycloak?.authenticated || !keycloak.token,
8
- context: {
9
- ...options?.context,
10
- headers: {
11
- ...(options?.context?.headers || {}),
12
- authorization: `Bearer ${keycloak?.token}`
13
- }
14
- }
15
- });
16
- }
17
- function useAuthMutation(mutation, options) {
18
- const keycloak = useKeycloak();
19
- return useMutation(mutation, {
20
- ...options,
21
- context: {
22
- ...options?.context,
23
- headers: {
24
- ...(options?.context?.headers || {}),
25
- authorization: `Bearer ${keycloak?.token}`
26
- }
27
- }
28
- });
29
- }
30
- function useAuthSubscription(subscription, options) {
31
- const keycloak = useKeycloak();
32
- return useSubscription(subscription, {
33
- ...options,
34
- skip: options?.skip || !keycloak?.authenticated || !keycloak.token,
35
- context: {
36
- ...options?.context,
37
- headers: {
38
- ...(options?.context?.headers || {}),
39
- authorization: `Bearer ${keycloak?.token}`
40
- }
41
- }
42
- });
43
- }
44
- export { useAuthMutation, useAuthQuery, useAuthSubscription };