@snokam/auth 1.1.5 → 2.0.1-alpha.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 CHANGED
@@ -3,72 +3,384 @@
3
3
  All notable changes to this project will be documented in this file.
4
4
  See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
5
 
6
- ## [1.1.5](https://github.com/snokam/components/compare/@snokam/auth@1.1.4...@snokam/auth@1.1.5) (2024-07-17)
6
+ ## [2.0.1-alpha.0](https://github.com/snokam/components/compare/@snokam/auth@2.0.0...@snokam/auth@2.0.1-alpha.0) (2024-09-11)
7
+
8
+ **Note:** Version bump only for package @snokam/auth
9
+
10
+
11
+
12
+
13
+
14
+ # [2.0.0](https://github.com/snokam/components/compare/@snokam/auth@1.0.32-alpha.4...@snokam/auth@2.0.0) (2024-09-09)
15
+
16
+
17
+ ### Bug Fixes
18
+
19
+ * clean up dependencies ([29d9836](https://github.com/snokam/components/commit/29d983669cea1c611eb423ffac322e0f8ae6a82a))
20
+ * trigger build ([ccb933a](https://github.com/snokam/components/commit/ccb933ab4106723a3c2cbd2a53691a0e9dd33e51))
21
+
22
+
23
+ ### Features
24
+
25
+ * revert "trigger build" ([a4e1c50](https://github.com/snokam/components/commit/a4e1c50a343e7fad606f72ab22075a43d4bf1c2d))
26
+
27
+
28
+ ### Performance Improvements
29
+
30
+ * **auth:** upgrade auth to new major ([7d4624a](https://github.com/snokam/components/commit/7d4624a4c3edfc5c5c093e84b9c87ede3b718488))
31
+
32
+
33
+ ### BREAKING CHANGES
34
+
35
+ * **auth:** Fix semantic versions.
36
+
37
+
38
+
39
+
40
+
41
+ ## [1.0.32-alpha.4](https://github.com/snokam/components/compare/@snokam/auth@1.0.32-alpha.3...@snokam/auth@1.0.32-alpha.4) (2024-09-09)
42
+
43
+
44
+ ### Reverts
45
+
46
+ * Revert "fix: peer dependencies for everything" ([19d6697](https://github.com/snokam/components/commit/19d6697ef42ea78db4c7ca1db438064f1e09c3d7))
47
+
48
+
49
+
50
+
51
+
52
+ ## [1.0.32-alpha.3](https://github.com/snokam/components/compare/@snokam/auth@1.0.32-alpha.2...@snokam/auth@1.0.32-alpha.3) (2024-09-08)
53
+
54
+ **Note:** Version bump only for package @snokam/auth
55
+
56
+
57
+
58
+
59
+
60
+ ## [1.0.32-alpha.2](https://github.com/snokam/components/compare/@snokam/auth@1.0.32-alpha.1...@snokam/auth@1.0.32-alpha.2) (2024-09-08)
61
+
62
+ **Note:** Version bump only for package @snokam/auth
63
+
64
+
65
+
66
+
67
+
68
+ ## [1.0.32-alpha.1](https://github.com/snokam/components/compare/@snokam/auth@1.0.32-alpha.0...@snokam/auth@1.0.32-alpha.1) (2024-09-08)
69
+
70
+ **Note:** Version bump only for package @snokam/auth
71
+
72
+
73
+
74
+
75
+
76
+ ## [1.0.32-alpha.0](https://github.com/snokam/components/compare/@snokam/auth@1.0.31...@snokam/auth@1.0.32-alpha.0) (2024-09-08)
77
+
78
+
79
+ ### Bug Fixes
80
+
81
+ * peer dependencies for everything ([694f8fa](https://github.com/snokam/components/commit/694f8fa4de2f1d94fc6fd58db519ee8efa1e20e0))
82
+
83
+
84
+
85
+
86
+
87
+ ## [1.0.31](https://github.com/snokam/components/compare/@snokam/auth@1.0.30...@snokam/auth@1.0.31) (2024-09-08)
88
+
89
+ **Note:** Version bump only for package @snokam/auth
90
+
91
+
92
+
93
+
94
+
95
+ ## [1.0.30](https://github.com/snokam/components/compare/@snokam/auth@1.0.29...@snokam/auth@1.0.30) (2024-09-08)
96
+
97
+
98
+ ### Bug Fixes
99
+
100
+ * update all peer deps ([343088a](https://github.com/snokam/components/commit/343088a2bee2cf07a49a0dfe6c6ab99b480a05cc))
101
+
102
+
103
+
104
+
105
+
106
+ ## [1.0.29](https://github.com/snokam/components/compare/@snokam/auth@1.0.28...@snokam/auth@1.0.29) (2024-09-08)
107
+
108
+
109
+ ### Bug Fixes
110
+
111
+ * remove lerna ignore ([25ce4d2](https://github.com/snokam/components/commit/25ce4d2013e03eca457501f19c0c406d8e379fc0))
112
+
113
+
114
+
115
+
116
+
117
+ ## [1.0.28](https://github.com/snokam/components/compare/@snokam/auth@1.0.27...@snokam/auth@1.0.28) (2024-09-04)
118
+
119
+ **Note:** Version bump only for package @snokam/auth
120
+
121
+
122
+
123
+
124
+
125
+ ## [1.0.27](https://github.com/snokam/components/compare/@snokam/auth@1.0.26...@snokam/auth@1.0.27) (2024-09-01)
126
+
127
+ **Note:** Version bump only for package @snokam/auth
128
+
129
+
130
+
131
+
132
+
133
+ ## [1.0.26](https://github.com/snokam/components/compare/@snokam/auth@1.0.25...@snokam/auth@1.0.26) (2024-09-01)
134
+
135
+ **Note:** Version bump only for package @snokam/auth
136
+
137
+
138
+
139
+
140
+
141
+ ## [1.0.25](https://github.com/snokam/components/compare/@snokam/auth@1.0.24...@snokam/auth@1.0.25) (2024-08-31)
142
+
143
+ **Note:** Version bump only for package @snokam/auth
144
+
145
+
146
+
147
+
148
+
149
+ ## [1.0.24](https://github.com/snokam/components/compare/@snokam/auth@1.0.23...@snokam/auth@1.0.24) (2024-08-31)
150
+
151
+ **Note:** Version bump only for package @snokam/auth
152
+
153
+
154
+
155
+
156
+
157
+ ## [1.0.23](https://github.com/snokam/components/compare/@snokam/auth@1.0.22...@snokam/auth@1.0.23) (2024-08-31)
158
+
159
+ **Note:** Version bump only for package @snokam/auth
160
+
161
+
162
+
163
+
164
+
165
+ ## [1.0.22](https://github.com/snokam/components/compare/@snokam/auth@1.0.21...@snokam/auth@1.0.22) (2024-08-31)
166
+
167
+
168
+ ### Bug Fixes
169
+
170
+ * add error for AZURE_AD_SECRET" ([9654d6f](https://github.com/snokam/components/commit/9654d6f6228777c9786bda102286bccce021d924))
171
+
172
+
173
+
174
+
175
+
176
+ ## [1.0.21](https://github.com/snokam/components/compare/@snokam/auth@1.0.20...@snokam/auth@1.0.21) (2024-08-31)
177
+
178
+ **Note:** Version bump only for package @snokam/auth
179
+
180
+
181
+
182
+
183
+
184
+ ## [1.0.20](https://github.com/snokam/components/compare/@snokam/auth@1.0.19...@snokam/auth@1.0.20) (2024-08-31)
185
+
186
+ **Note:** Version bump only for package @snokam/auth
187
+
188
+
189
+
190
+
191
+
192
+ ## [1.0.19](https://github.com/snokam/components/compare/@snokam/auth@1.0.18...@snokam/auth@1.0.19) (2024-08-31)
193
+
194
+ **Note:** Version bump only for package @snokam/auth
195
+
196
+
197
+
198
+
199
+
200
+ ## [1.0.18](https://github.com/snokam/components/compare/@snokam/auth@1.0.17...@snokam/auth@1.0.18) (2024-08-28)
201
+
202
+ **Note:** Version bump only for package @snokam/auth
203
+
204
+
205
+
206
+
207
+
208
+ ## [1.0.17](https://github.com/snokam/components/compare/@snokam/auth@1.0.16...@snokam/auth@1.0.17) (2024-08-28)
209
+
210
+ **Note:** Version bump only for package @snokam/auth
211
+
212
+
213
+
214
+
215
+
216
+ ## [1.0.16](https://github.com/snokam/components/compare/@snokam/auth@1.0.15...@snokam/auth@1.0.16) (2024-08-28)
217
+
218
+ **Note:** Version bump only for package @snokam/auth
219
+
220
+
221
+
222
+
223
+
224
+ ## [1.0.15](https://github.com/snokam/components/compare/@snokam/auth@1.0.14...@snokam/auth@1.0.15) (2024-08-28)
7
225
 
8
226
 
9
227
  ### Bug Fixes
10
228
 
11
- * build problems ([c5df934](https://github.com/snokam/components/commit/c5df934c67cba6a2b3a2c127b2e0e438dcbd3ace))
12
- * extend config ([98bd421](https://github.com/snokam/components/commit/98bd42149e7c68490a6ae3442d788b574fb9784f))
229
+ * add typesVersions ([d23573d](https://github.com/snokam/components/commit/d23573d5cce1c4aff4cbcf62be17b6409056e3eb))
230
+ * remove prefix ([15f3175](https://github.com/snokam/components/commit/15f31752576c8f4e41e0da9e0829d8596291fb7f))
13
231
 
14
232
 
15
233
 
16
234
 
17
235
 
18
- ## [1.1.4](https://github.com/snokam/components/compare/@snokam/auth@1.1.3...@snokam/auth@1.1.4) (2024-07-17)
236
+ ## [1.0.14](https://github.com/snokam/components/compare/@snokam/auth@1.0.13...@snokam/auth@1.0.14) (2024-08-28)
19
237
 
20
238
 
21
239
  ### Bug Fixes
22
240
 
23
- * rewrite library to use typescript-fetch! ([e7bb8aa](https://github.com/snokam/components/commit/e7bb8aa8c8638bd8869589ea0d5c3364d451cf60))
24
- * types ([3c20479](https://github.com/snokam/components/commit/3c20479f4330878edc9144b28739c4b3bc53874c))
241
+ * add bundler ([5f746aa](https://github.com/snokam/components/commit/5f746aa19fc3320ef8d577645b82960676e1a1ea))
25
242
 
26
243
 
27
244
 
28
245
 
29
246
 
30
- ## [1.1.3](https://github.com/snokam/components/compare/@snokam/auth@1.1.2...@snokam/auth@1.1.3) (2024-07-17)
247
+ ## [1.0.13](https://github.com/snokam/components/compare/@snokam/auth@1.0.12...@snokam/auth@1.0.13) (2024-08-28)
31
248
 
32
249
 
33
250
  ### Bug Fixes
34
251
 
35
- * cleanup ([69e73b4](https://github.com/snokam/components/commit/69e73b42e3ec6aedd2e9d1ab798b67c35f5fd3af))
36
- * update deps ([ac90b46](https://github.com/snokam/components/commit/ac90b4651e99404d22eadebd7385e99337a74dd2))
252
+ * deploy ([b035c26](https://github.com/snokam/components/commit/b035c26cc69d27c7890be4f9cd64f9c900cf4246))
253
+ * diff ([66a128a](https://github.com/snokam/components/commit/66a128a9ec73be500c0660ba4ac74e441b2aae61))
254
+ * export types ([f57b59d](https://github.com/snokam/components/commit/f57b59d21f4fb44dc56ace7b8c8ce622fba45ab0))
255
+ * reintroduce variable ([0e1698d](https://github.com/snokam/components/commit/0e1698d470ee1013569d5f4b11c55cc8bbec3450))
256
+ * remove comment ([cb774ca](https://github.com/snokam/components/commit/cb774caa0582c22088789bae44ef7e6631e117b6))
257
+ * remove export ([c56ad78](https://github.com/snokam/components/commit/c56ad786d74b64be2907c8ef627f17733ea44687))
37
258
 
38
259
 
39
260
 
40
261
 
41
262
 
42
- ## [1.1.2](https://github.com/snokam/components/compare/@snokam/auth@1.1.1...@snokam/auth@1.1.2) (2024-07-17)
263
+ ## [1.0.12](https://github.com/snokam/components/compare/@snokam/auth@1.0.11...@snokam/auth@1.0.12) (2024-08-28)
43
264
 
44
265
 
45
266
  ### Bug Fixes
46
267
 
47
- * try to fix types ([4b1dc2b](https://github.com/snokam/components/commit/4b1dc2b5133ef23e685c225ce12b2f3c7d69bbe3))
268
+ * expose server ([90202d5](https://github.com/snokam/components/commit/90202d506e391b75e6ce8aa338d38da2d1fb0548))
269
+
270
+
271
+
272
+
273
+
274
+ ## [1.0.11](https://github.com/snokam/components/compare/@snokam/auth@1.0.10...@snokam/auth@1.0.11) (2024-08-28)
275
+
276
+ **Note:** Version bump only for package @snokam/auth
277
+
48
278
 
49
279
 
50
280
 
51
281
 
282
+ ## [1.0.10](https://github.com/snokam/components/compare/@snokam/auth@1.0.9...@snokam/auth@1.0.10) (2024-08-28)
52
283
 
53
- ## [1.1.1](https://github.com/snokam/components/compare/@snokam/auth@1.1.0...@snokam/auth@1.1.1) (2024-07-17)
284
+ **Note:** Version bump only for package @snokam/auth
285
+
286
+
287
+
288
+
289
+
290
+ ## [1.0.9](https://github.com/snokam/components/compare/@snokam/auth@1.0.8...@snokam/auth@1.0.9) (2024-08-28)
54
291
 
55
292
 
56
293
  ### Bug Fixes
57
294
 
58
- * add useClient function ([a0beff3](https://github.com/snokam/components/commit/a0beff349c625a7f1823fe91de8b30d64a26b5fd))
295
+ * export authenticate on top level ([5ff50dc](https://github.com/snokam/components/commit/5ff50dc99cb11daeb34aecf37a86e5cae8ba5d62))
59
296
 
60
297
 
61
298
 
62
299
 
63
300
 
64
- # 1.1.0 (2024-07-17)
301
+ ## [1.0.8](https://github.com/snokam/components/compare/@snokam/auth@1.0.7...@snokam/auth@1.0.8) (2024-08-28)
65
302
 
66
303
 
67
304
  ### Bug Fixes
68
305
 
69
- * paths for auth ([72673fe](https://github.com/snokam/components/commit/72673fec2e81779566283b15d06c2e163667428d))
306
+ * export authenticate ([7062de7](https://github.com/snokam/components/commit/7062de7a362d59863595ce38b9b5ec87b428ace4))
70
307
 
71
308
 
72
- ### Features
73
309
 
74
- * add auth package ([26cadad](https://github.com/snokam/components/commit/26cadadfc53812863e10931daff039f00e7c866a))
310
+
311
+
312
+ ## [1.0.7](https://github.com/snokam/components/compare/@snokam/auth@1.0.6...@snokam/auth@1.0.7) (2024-08-28)
313
+
314
+
315
+ ### Bug Fixes
316
+
317
+ * add dev deps ([28c56c7](https://github.com/snokam/components/commit/28c56c7973e290d0a5437fb4dd25cd35a8917379))
318
+
319
+
320
+
321
+
322
+
323
+ ## [1.0.6](https://github.com/snokam/components/compare/@snokam/auth@1.0.5...@snokam/auth@1.0.6) (2024-08-28)
324
+
325
+
326
+ ### Bug Fixes
327
+
328
+ * add server function ([dbeb3b7](https://github.com/snokam/components/commit/dbeb3b737830da3be3089b7e8a22a806bd6463e8))
329
+ * cleanup ([edf1e20](https://github.com/snokam/components/commit/edf1e2024c04412d01d4ca6f3547a35f8e1f2fb3))
330
+ * imports ([7e01e16](https://github.com/snokam/components/commit/7e01e16d84a40ff876ca9bd7c0ef001e57b3c148))
331
+ * save file ([e3cb96a](https://github.com/snokam/components/commit/e3cb96a8533e60bea5c27c97ecddc779908b6f49))
332
+
333
+
334
+
335
+
336
+
337
+ ## [1.0.5](https://github.com/snokam/components/compare/@snokam/auth@1.0.4...@snokam/auth@1.0.5) (2024-08-28)
338
+
339
+
340
+ ### Bug Fixes
341
+
342
+ * add callbackg ([6bbacc4](https://github.com/snokam/components/commit/6bbacc4eeb20aabec3c74bd165bde8761ef08c96))
343
+
344
+
345
+
346
+
347
+
348
+ ## [1.0.4](https://github.com/snokam/components/compare/@snokam/auth@1.0.3...@snokam/auth@1.0.4) (2024-08-28)
349
+
350
+
351
+ ### Bug Fixes
352
+
353
+ * remove useMemo ([b279bb4](https://github.com/snokam/components/commit/b279bb4e6de4657cd9c433908f0ba661f6cd4aac))
354
+
355
+
356
+
357
+
358
+
359
+ ## [1.0.3](https://github.com/snokam/components/compare/@snokam/auth@1.0.2...@snokam/auth@1.0.3) (2024-08-28)
360
+
361
+
362
+ ### Bug Fixes
363
+
364
+ * configg ([d04c85f](https://github.com/snokam/components/commit/d04c85f0865e51632cf08c63d2d1d77aebed73d2))
365
+
366
+
367
+
368
+
369
+
370
+ ## [1.0.2](https://github.com/snokam/components/compare/@snokam/auth@1.0.1...@snokam/auth@1.0.2) (2024-08-28)
371
+
372
+
373
+ ### Bug Fixes
374
+
375
+ * cleanup ([128a74e](https://github.com/snokam/components/commit/128a74e366f923cc3b2621c42ecbf8f23116be7d))
376
+
377
+
378
+
379
+
380
+
381
+ ## [1.0.1](https://github.com/snokam/components/compare/@snokam/auth@1.1.5...@snokam/auth@1.0.1) (2024-08-28)
382
+
383
+
384
+ ### Bug Fixes
385
+
386
+ * add snokam/auth ([ab21cc0](https://github.com/snokam/components/commit/ab21cc0ce9c5096ad144877e5288cfe34597c961))
@@ -0,0 +1,2 @@
1
+ import { Auth } from "../../types";
2
+ export declare const Authenticate: (props: Auth.Provider.Props) => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,2 @@
1
+ export declare const Callback: () => import("react/jsx-runtime").JSX.Element;
2
+ export default Callback;
@@ -0,0 +1 @@
1
+ export declare const PopupLogin: () => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,6 @@
1
+ import { Auth } from "../../types";
2
+ export declare const Provider: {
3
+ (props: Auth.Provider.Props): import("react/jsx-runtime").JSX.Element;
4
+ Callback: () => import("react/jsx-runtime").JSX.Element;
5
+ };
6
+ export default Provider;
@@ -0,0 +1,19 @@
1
+ export declare const config: {
2
+ auth: {
3
+ clientId: string;
4
+ authority: string;
5
+ postLogoutRedirectUri: string;
6
+ redirectUri: string;
7
+ navigateToLoginRequestUrl: boolean;
8
+ };
9
+ system: {
10
+ allowRedirectInIframe: boolean;
11
+ };
12
+ cache: {
13
+ storeAuthStateInCookie: boolean;
14
+ cacheLocation: string;
15
+ };
16
+ };
17
+ export declare const loginRequest: {
18
+ scopes: string[];
19
+ };
package/lib/hooks.d.ts ADDED
@@ -0,0 +1,7 @@
1
+ export declare const useAuth: () => {
2
+ getToken: (scopes?: string[]) => Promise<string>;
3
+ isAuthenticated: boolean;
4
+ inProgress: boolean;
5
+ instance: import("@azure/msal-browser").IPublicClientApplication;
6
+ account: import("@azure/msal-browser").AccountInfo;
7
+ };
package/lib/index.d.ts CHANGED
@@ -1,7 +1,11 @@
1
- import { AuthProps } from "./types";
2
- import { Configuration } from "./client";
3
- export type { AuthProps, Configuration };
4
- export declare const useClient: (props: AuthProps) => {
5
- configuration: Configuration;
6
- getToken: (scopes?: string[]) => Promise<any>;
1
+ import { Auth } from "./types";
2
+ export { useAuth } from "./hooks";
3
+ export type { Auth };
4
+ declare const _default: {
5
+ Provider: {
6
+ (props: Auth.Provider.Props): import("react/jsx-runtime").JSX.Element;
7
+ Callback: () => import("react/jsx-runtime").JSX.Element;
8
+ };
9
+ Authenticate: (props: Auth.Provider.Props) => import("react/jsx-runtime").JSX.Element;
7
10
  };
11
+ export default _default;
package/lib/index.js CHANGED
@@ -1,2 +1,10 @@
1
- !function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.snokam=t():e.snokam=t()}(this,(()=>(()=>{"use strict";var e={689:(e,t,o)=>{o.d(t,{Configuration:()=>n.Configuration});const n=require("@snokam/employees-client")}},t={};function o(n){var r=t[n];if(void 0!==r)return r.exports;var a=t[n]={exports:{}};return e[n](a,a.exports,o),a.exports}o.d=(e,t)=>{for(var n in t)o.o(t,n)&&!o.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},o.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),o.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var n={};o.r(n),o.d(n,{useClient:()=>c});const r=require("@azure/msal-react");var a=o(689);const c=e=>{const{basePath:t,withAuth:o}=e,n=function(e,t){var o={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(o[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var r=0;for(n=Object.getOwnPropertySymbols(e);r<n.length;r++)t.indexOf(n[r])<0&&Object.prototype.propertyIsEnumerable.call(e,n[r])&&(o[n[r]]=e[n[r]])}return o}(e,["basePath","withAuth"]),{instance:c}=(0,r.useMsal)(),i=c.getAllAccounts()[0],s=e=>{return t=void 0,o=void 0,r=function*(){return c.acquireTokenSilent({scopes:e||[],account:i}).then((({accessToken:e})=>`Bearer ${e}`)).catch((e=>{throw console.error(e),e}))},new((n=void 0)||(n=Promise))((function(e,a){function c(e){try{s(r.next(e))}catch(e){a(e)}}function i(e){try{s(r.throw(e))}catch(e){a(e)}}function s(t){var o;t.done?e(t.value):(o=t.value,o instanceof n?o:new n((function(e){e(o)}))).then(c,i)}s((r=r.apply(t,o||[])).next())}));var t,o,n,r};return{configuration:new a.Configuration(Object.assign(Object.assign({basePath:t},o&&{accessToken:(e,t)=>s(t)}),n)),getToken:s}};return n})()));
1
+ !function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.snokam=t():e.snokam=t()}(this,(()=>(()=>{"use strict";var e={n:t=>{var n=t&&t.__esModule?()=>t.default:()=>t;return e.d(n,{a:n}),n},d:(t,n)=>{for(var r in n)e.o(n,r)&&!e.o(t,r)&&Object.defineProperty(t,r,{enumerable:!0,get:n[r]})},o:(e,t)=>Object.prototype.hasOwnProperty.call(e,t),r:e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})}},t={};e.r(t),e.d(t,{default:()=>T,useAuth:()=>g});const n=require("react/jsx-runtime"),r=require("@azure/msal-react"),o=require("@azure/msal-browser"),i=require("next/router"),s={auth:{clientId:`${process.env.NEXT_PUBLIC_AZURE_AD_CLIENT_ID}`,authority:`https://login.microsoftonline.com/${process.env.NEXT_PUBLIC_AZURE_AD_TENANT_ID}/`,postLogoutRedirectUri:"/",redirectUri:"/callback",navigateToLoginRequestUrl:!1},system:{allowRedirectInIframe:!0},cache:{storeAuthStateInCookie:!0,cacheLocation:"localStorage"}},c={scopes:["openid"]},a="redirect",l=()=>{window.sessionStorage.setItem(a,window.location.pathname)},u=require("@snokam/core"),d=require("@mui/material"),p=require("react"),g=()=>{const{instance:e,inProgress:t}=(0,r.useMsal)(),n=e.getAllAccounts()[0];return{getToken:t=>e.acquireTokenSilent({scopes:t||[],account:n}).then((({accessToken:e})=>`Bearer ${e}`)),isAuthenticated:(0,r.useIsAuthenticated)(),inProgress:"startup"===t||"login"===t,instance:e,account:n}},m=require("@emotion/styled");var h=e.n(m);const f={Container:h().div`
2
+ display: flex;
3
+ flex-direction: column;
4
+ justify-content: center;
5
+ align-items: center;
6
+ flex: 1;
7
+ `,Link:h().a`
8
+ text-decoration: "underline";
9
+ `},_=()=>{const{instance:e}=(0,r.useMsal)(),{account:t}=g(),[o,i]=(0,p.useState)();return o?(0,n.jsxs)(f.Container,{children:[(0,n.jsxs)("p",{children:["En feil oppstod: ",o.errorCode]}),(0,n.jsxs)("span",{children:["Prøv å gå direkte til ",(0,n.jsx)(f.Link,{target:"_blank",href:"https://skjer.snokam.no/?enforceLogin=true",rel:"noopener noreferrer",children:"skjer.snokam.no"}),"."]})]}):(0,n.jsxs)(f.Container,{children:["Du må logge inn på nytt for å vise siden",(0,n.jsx)(d.Button,{sx:{marginTop:"1rem"},onClick:()=>{l(),e.loginPopup(Object.assign(Object.assign(Object.assign({},c),t&&{account:t}),{redirectUri:"/blank.html"})).then((()=>i(void 0))).catch((e=>i(e)))},children:"Fortsett"})]})},j=e=>{const{children:t}=e,{query:s}=(0,i.useRouter)(),a=s.username,d=(null==s?void 0:s.enforceLogin)&&(null==s?void 0:s.username)?o.InteractionType.Silent:o.InteractionType.Redirect,p=Object.assign(Object.assign(Object.assign({},c),a&&{loginHint:a}),{onRedirectNavigate:e=>{l()}});return(0,n.jsx)(r.MsalAuthenticationTemplate,{interactionType:d,authenticationRequest:p,errorComponent:_,loadingComponent:()=>(0,n.jsx)(u.PageLoader,{color:"inherit"}),children:t})},b=new o.PublicClientApplication(s);b.initialize();const v=e=>{const{children:t,enforceLogin:o}=e,{query:s}=(0,i.useRouter)();if(!process.env.NEXT_PUBLIC_AZURE_AD_CLIENT_ID)throw new Error("NEXT_PUBLIC_AZURE_AD_CLIENT_ID must be set in the environment variables");if(!process.env.NEXT_PUBLIC_AZURE_AD_TENANT_ID)throw new Error("NEXT_PUBLIC_AZURE_AD_TENANT_ID must be set in the environment variables");return s.enforceLogin||o?(0,n.jsx)(r.MsalProvider,{instance:b,children:(0,n.jsx)(j,Object.assign({},e,{children:t}))}):(0,n.jsx)(r.MsalProvider,{instance:b,children:t})};v.Callback=()=>{const e=(0,i.useRouter)();return(0,p.useEffect)((()=>{const t=window.sessionStorage.getItem(a);t?(window.sessionStorage.removeItem(a),console.log(`Redirecting to ${t} ...`),e.replace(t)):e.replace("/")}),[e]),(0,n.jsx)(u.PageLoader,{color:"inherit"})};const T={Provider:v,Authenticate:j};return t})()));
2
10
  //# sourceMappingURL=index.js.map
package/lib/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","mappings":"CAAA,SAA2CA,EAAMC,GAC1B,iBAAZC,SAA0C,iBAAXC,OACxCA,OAAOD,QAAUD,IACQ,mBAAXG,QAAyBA,OAAOC,IAC9CD,OAAO,GAAIH,GACe,iBAAZC,QACdA,QAAgB,OAAID,IAEpBD,EAAa,OAAIC,GAClB,CATD,CASGK,MAAM,I,mFCTT,MAAM,EAA+BC,QAAQ,2B,GCCzCC,EAA2B,CAAC,EAGhC,SAASC,EAAoBC,GAE5B,IAAIC,EAAeH,EAAyBE,GAC5C,QAAqBE,IAAjBD,EACH,OAAOA,EAAaT,QAGrB,IAAIC,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pCC,EAAYC,IAAWC,OA3BqBC,OA2BX,EA3BoBC,OA2BZ,EA3B2BC,EA2BX,YAC3D,OAAOT,EACFU,mBAAmB,CACpBL,OAAQA,GAAU,GAClBH,QAASA,IAERS,MAAK,EAAGC,iBAAkB,UAAUA,MACpCC,OAAOC,IAER,MADAC,QAAQD,MAAMA,GACRA,CAAK,GAEnB,EApCO,KAFgEE,OA2BhB,KAzBrCA,EAAIC,WAAU,SAAUC,EAASC,GAC/C,SAASC,EAAUpC,GAAS,IAAMqC,EAAKZ,EAAUa,KAAKtC,GAAS,CAAE,MAAOO,GAAK4B,EAAO5B,EAAI,CAAE,CAC1F,SAASgC,EAASvC,GAAS,IAAMqC,EAAKZ,EAAiB,MAAEzB,GAAS,CAAE,MAAOO,GAAK4B,EAAO5B,EAAI,CAAE,CAC7F,SAAS8B,EAAKG,GAJlB,IAAexC,EAIawC,EAAOC,KAAOP,EAAQM,EAAOxC,QAJ1CA,EAIyDwC,EAAOxC,MAJhDA,aAAiBgC,EAAIhC,EAAQ,IAAIgC,GAAE,SAAUE,GAAWA,EAAQlC,EAAQ,KAIjB2B,KAAKS,EAAWG,EAAW,CAC7GF,GAAMZ,EAAYA,EAAUiB,MAAMnB,EAASC,GAAc,KAAKc,OAClE,IAPwC,IAAUf,EAASC,EAAYQ,EAAGP,CAsCxE,EAKF,MAAO,CACHkB,cAJkB,IAAI,EAAAC,cAAcxD,OAAOyD,OAAOzD,OAAOyD,OAAO,CAAE1C,YAAaC,GAAY,CAC3FwB,YAAa,CAACkB,EAAGzB,IAAWD,EAASC,KACpChB,IAGDe,WACH,E","sources":["webpack://snokam/webpack/universalModuleDefinition","webpack://snokam/external commonjs \"@snokam/employees-client\"","webpack://snokam/webpack/bootstrap","webpack://snokam/webpack/runtime/define property getters","webpack://snokam/webpack/runtime/hasOwnProperty shorthand","webpack://snokam/webpack/runtime/make namespace object","webpack://snokam/external commonjs \"@azure/msal-react\"","webpack://snokam/./src/index.tsx"],"sourcesContent":["(function webpackUniversalModuleDefinition(root, factory) {\n\tif(typeof exports === 'object' && typeof module === 'object')\n\t\tmodule.exports = factory();\n\telse if(typeof define === 'function' && define.amd)\n\t\tdefine([], factory);\n\telse if(typeof exports === 'object')\n\t\texports[\"snokam\"] = factory();\n\telse\n\t\troot[\"snokam\"] = factory();\n})(this, () => {\nreturn ","const __WEBPACK_NAMESPACE_OBJECT__ = require(\"@snokam/employees-client\");","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\t// no module.id needed\n\t\t// no module.loaded needed\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId](module, module.exports, __webpack_require__);\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n","// define getter functions for harmony exports\n__webpack_require__.d = (exports, definition) => {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))","// define __esModule on exports\n__webpack_require__.r = (exports) => {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","const __WEBPACK_NAMESPACE_OBJECT__ = require(\"@azure/msal-react\");","var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nvar __rest = (this && this.__rest) || function (s, e) {\n var t = {};\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)\n t[p] = s[p];\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\")\n for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))\n t[p[i]] = s[p[i]];\n }\n return t;\n};\nimport { useMsal } from \"@azure/msal-react\";\nimport { Configuration } from \"./client\";\nexport const useClient = (props) => {\n const { basePath, withAuth } = props, restProps = __rest(props, [\"basePath\", \"withAuth\"]);\n const { instance } = useMsal();\n const account = instance.getAllAccounts()[0];\n // Fetch token from Azure Entra\n const getToken = (scopes) => __awaiter(void 0, void 0, void 0, function* () {\n return instance\n .acquireTokenSilent({\n scopes: scopes || [],\n account: account,\n })\n .then(({ accessToken }) => `Bearer ${accessToken}`)\n .catch((error) => {\n console.error(error);\n throw error;\n });\n });\n // Create configuration for Snøkam clients\n const configuration = new Configuration(Object.assign(Object.assign({ basePath }, (withAuth && {\n accessToken: (_, scopes) => getToken(scopes),\n })), restProps));\n return {\n configuration,\n getToken,\n };\n};\n"],"names":["root","factory","exports","module","define","amd","this","require","__webpack_module_cache__","__webpack_require__","moduleId","cachedModule","undefined","__webpack_modules__","d","definition","key","o","Object","defineProperty","enumerable","get","obj","prop","prototype","hasOwnProperty","call","r","Symbol","toStringTag","value","useClient","props","basePath","withAuth","restProps","s","e","t","p","indexOf","getOwnPropertySymbols","i","length","propertyIsEnumerable","__rest","instance","useMsal","account","getAllAccounts","getToken","scopes","__awaiter","thisArg","_arguments","generator","acquireTokenSilent","then","accessToken","catch","error","console","P","Promise","resolve","reject","fulfilled","step","next","rejected","result","done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MjD,MErBA,GAAiBI,SAAQ,eAAc,G","sources":["webpack://snokam/webpack/universalModuleDefinition","webpack://snokam/webpack/bootstrap","webpack://snokam/webpack/runtime/compat get default export","webpack://snokam/webpack/runtime/define property getters","webpack://snokam/webpack/runtime/hasOwnProperty shorthand","webpack://snokam/webpack/runtime/make namespace object","webpack://snokam/external commonjs \"react/jsx-runtime\"","webpack://snokam/external commonjs \"@azure/msal-react\"","webpack://snokam/external commonjs \"@azure/msal-browser\"","webpack://snokam/external commonjs \"next/router\"","webpack://snokam/./src/config.ts","webpack://snokam/./src/storage.ts","webpack://snokam/external commonjs \"@snokam/core\"","webpack://snokam/external commonjs \"@mui/material\"","webpack://snokam/external commonjs \"react\"","webpack://snokam/./src/hooks.ts","webpack://snokam/external commonjs \"@emotion/styled\"","webpack://snokam/./src/components/Provider/styled.tsx","webpack://snokam/./src/components/Provider/Provider.PopupLogin.tsx","webpack://snokam/./src/components/Provider/Provider.Authenticate.tsx","webpack://snokam/./src/components/Provider/index.tsx","webpack://snokam/./src/components/Provider/Provider.Callback.tsx","webpack://snokam/./src/index.tsx"],"sourcesContent":["(function webpackUniversalModuleDefinition(root, factory) {\n\tif(typeof exports === 'object' && typeof module === 'object')\n\t\tmodule.exports = factory();\n\telse if(typeof define === 'function' && define.amd)\n\t\tdefine([], factory);\n\telse if(typeof exports === 'object')\n\t\texports[\"snokam\"] = factory();\n\telse\n\t\troot[\"snokam\"] = factory();\n})(this, () => {\nreturn ","// The require scope\nvar __webpack_require__ = {};\n\n","// getDefaultExport function for compatibility with non-harmony modules\n__webpack_require__.n = (module) => {\n\tvar getter = module && module.__esModule ?\n\t\t() => (module['default']) :\n\t\t() => (module);\n\t__webpack_require__.d(getter, { a: getter });\n\treturn getter;\n};","// define getter functions for harmony exports\n__webpack_require__.d = (exports, definition) => {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))","// define __esModule on exports\n__webpack_require__.r = (exports) => {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","const __WEBPACK_NAMESPACE_OBJECT__ = require(\"react/jsx-runtime\");","const __WEBPACK_NAMESPACE_OBJECT__ = require(\"@azure/msal-react\");","const __WEBPACK_NAMESPACE_OBJECT__ = require(\"@azure/msal-browser\");","const __WEBPACK_NAMESPACE_OBJECT__ = require(\"next/router\");","export const config = {\n auth: {\n clientId: `${process.env.NEXT_PUBLIC_AZURE_AD_CLIENT_ID}`,\n authority: `https://login.microsoftonline.com/${process.env.NEXT_PUBLIC_AZURE_AD_TENANT_ID}/`,\n postLogoutRedirectUri: \"/\",\n redirectUri: `/callback`,\n navigateToLoginRequestUrl: false,\n },\n system: {\n allowRedirectInIframe: true,\n },\n cache: {\n storeAuthStateInCookie: true,\n cacheLocation: \"localStorage\",\n },\n};\nexport const loginRequest = {\n scopes: [\"openid\"],\n};\n","const SessionStorageKey = \"redirect\";\nexport const storeCurrentPath = () => {\n window.sessionStorage.setItem(SessionStorageKey, window.location.pathname);\n};\nexport const getStoredPath = () => {\n return window.sessionStorage.getItem(SessionStorageKey);\n};\nexport const clearStoredPath = () => {\n window.sessionStorage.removeItem(SessionStorageKey);\n};\n","const __WEBPACK_NAMESPACE_OBJECT__ = require(\"@snokam/core\");","const __WEBPACK_NAMESPACE_OBJECT__ = require(\"@mui/material\");","const __WEBPACK_NAMESPACE_OBJECT__ = require(\"react\");","import { useIsAuthenticated, useMsal } from \"@azure/msal-react\";\nexport const useAuth = () => {\n const { instance, inProgress } = useMsal();\n const account = instance.getAllAccounts()[0];\n const isAuthenticated = useIsAuthenticated();\n const getToken = (scopes) => instance\n .acquireTokenSilent({\n scopes: scopes || [],\n account: account,\n })\n .then(({ accessToken }) => `Bearer ${accessToken}`);\n return {\n getToken,\n isAuthenticated,\n inProgress: inProgress === \"startup\" || inProgress === \"login\",\n instance,\n account,\n };\n};\n","const __WEBPACK_NAMESPACE_OBJECT__ = require(\"@emotion/styled\");","import styled from \"@emotion/styled\";\nconst Container = styled.div `\n display: flex;\n flex-direction: column;\n justify-content: center;\n align-items: center;\n flex: 1;\n`;\nconst Link = styled.a `\n text-decoration: \"underline\";\n`;\nexport default { Container, Link };\n","import { jsxs as _jsxs, jsx as _jsx } from \"react/jsx-runtime\";\nimport { useMsal } from \"@azure/msal-react\";\nimport { Button } from \"@mui/material\";\nimport { storeCurrentPath } from \"../../storage\";\nimport { useState } from \"react\";\nimport { useAuth } from \"../../hooks\";\nimport { loginRequest } from \"../../config\";\nimport Styled from \"./styled\";\nexport const PopupLogin = () => {\n const { instance } = useMsal();\n const { account } = useAuth();\n const [popupError, setPopupError] = useState();\n if (popupError) {\n return (_jsxs(Styled.Container, { children: [_jsxs(\"p\", { children: [\"En feil oppstod: \", popupError.errorCode] }), _jsxs(\"span\", { children: [`Prøv å gå direkte til `, _jsx(Styled.Link, { target: \"_blank\", href: \"https://skjer.snokam.no/?enforceLogin=true\", rel: \"noopener noreferrer\", children: \"skjer.snokam.no\" }), \".\"] })] }));\n }\n return (_jsxs(Styled.Container, { children: [\"Du m\\u00E5 logge inn p\\u00E5 nytt for \\u00E5 vise siden\", _jsx(Button, { sx: { marginTop: \"1rem\" }, onClick: () => {\n storeCurrentPath();\n instance\n .loginPopup(Object.assign(Object.assign(Object.assign({}, loginRequest), (account && {\n account,\n })), { redirectUri: \"/blank.html\" }))\n .then(() => setPopupError(undefined))\n .catch((error) => setPopupError(error));\n }, children: \"Fortsett\" })] }));\n};\n","import { jsx as _jsx } from \"react/jsx-runtime\";\nimport { MsalAuthenticationTemplate } from \"@azure/msal-react\";\nimport { InteractionType } from \"@azure/msal-browser\";\nimport { storeCurrentPath } from \"../../storage\";\nimport { useRouter } from \"next/router\";\nimport { PageLoader } from \"@snokam/core\";\nimport { loginRequest } from \"../../config\";\nimport { PopupLogin } from \"./Provider.PopupLogin\";\nexport const Authenticate = (props) => {\n const { children } = props;\n const { query } = useRouter();\n const username = query.username;\n const interactionType = (query === null || query === void 0 ? void 0 : query.enforceLogin) && (query === null || query === void 0 ? void 0 : query.username)\n ? InteractionType.Silent\n : InteractionType.Redirect;\n const authRequest = Object.assign(Object.assign(Object.assign({}, loginRequest), (username && {\n loginHint: username,\n })), { onRedirectNavigate: (_) => {\n storeCurrentPath();\n } });\n const Loading = () => {\n return _jsx(PageLoader, { color: \"inherit\" });\n };\n return (_jsx(MsalAuthenticationTemplate, { interactionType: interactionType, authenticationRequest: authRequest, errorComponent: PopupLogin, loadingComponent: Loading, children: children }));\n};\n","import { jsx as _jsx } from \"react/jsx-runtime\";\nimport { MsalProvider } from \"@azure/msal-react\";\nimport { PublicClientApplication } from \"@azure/msal-browser\";\nimport { useRouter } from \"next/router\";\nimport { config } from \"../../config\";\nimport { Authenticate } from \"./Provider.Authenticate\";\nimport Callback from \"./Provider.Callback\";\nconst msalInstance = new PublicClientApplication(config);\nmsalInstance.initialize();\nexport const Provider = (props) => {\n const { children, enforceLogin } = props;\n const { query } = useRouter();\n if (!process.env.NEXT_PUBLIC_AZURE_AD_CLIENT_ID) {\n throw new Error(\"NEXT_PUBLIC_AZURE_AD_CLIENT_ID must be set in the environment variables\");\n }\n if (!process.env.NEXT_PUBLIC_AZURE_AD_TENANT_ID) {\n throw new Error(\"NEXT_PUBLIC_AZURE_AD_TENANT_ID must be set in the environment variables\");\n }\n if (query.enforceLogin || enforceLogin) {\n return (_jsx(MsalProvider, { instance: msalInstance, children: _jsx(Authenticate, Object.assign({}, props, { children: children })) }));\n }\n return _jsx(MsalProvider, { instance: msalInstance, children: children });\n};\nProvider.Callback = Callback;\nexport default Provider;\n","import { jsx as _jsx } from \"react/jsx-runtime\";\nimport { useEffect } from \"react\";\nimport { useRouter } from \"next/router\";\nimport { clearStoredPath, getStoredPath } from \"../../storage\";\nimport { PageLoader } from \"@snokam/core\";\nexport const Callback = () => {\n const router = useRouter();\n useEffect(() => {\n const redirectUrl = getStoredPath();\n if (redirectUrl) {\n clearStoredPath();\n console.log(`Redirecting to ${redirectUrl} ...`);\n router.replace(redirectUrl);\n }\n else {\n router.replace(\"/\");\n }\n }, [router]);\n return _jsx(PageLoader, { color: \"inherit\" });\n};\nexport default Callback;\n","import { Provider } from \"./components/Provider\";\nimport { Authenticate } from \"./components/Provider/Provider.Authenticate\";\nexport { useAuth } from \"./hooks\";\nexport default { Provider, Authenticate };\n// Trigger build\n"],"names":["root","factory","exports","module","define","amd","this","__webpack_require__","getter","__esModule","d","a","definition","key","o","Object","defineProperty","enumerable","get","obj","prop","prototype","hasOwnProperty","call","Symbol","toStringTag","value","require","config","auth","clientId","process","env","NEXT_PUBLIC_AZURE_AD_CLIENT_ID","authority","NEXT_PUBLIC_AZURE_AD_TENANT_ID","postLogoutRedirectUri","redirectUri","navigateToLoginRequestUrl","system","allowRedirectInIframe","cache","storeAuthStateInCookie","cacheLocation","loginRequest","scopes","SessionStorageKey","storeCurrentPath","window","sessionStorage","setItem","location","pathname","useAuth","instance","inProgress","useMsal","account","getAllAccounts","getToken","acquireTokenSilent","then","accessToken","isAuthenticated","useIsAuthenticated","Container","Link","PopupLogin","popupError","setPopupError","useState","children","errorCode","target","href","rel","Button","sx","marginTop","onClick","loginPopup","assign","undefined","catch","error","Authenticate","props","query","useRouter","username","interactionType","enforceLogin","InteractionType","Silent","Redirect","authRequest","loginHint","onRedirectNavigate","_","MsalAuthenticationTemplate","authenticationRequest","errorComponent","loadingComponent","PageLoader","color","msalInstance","PublicClientApplication","initialize","Provider","Error","MsalProvider","Callback","router","useEffect","redirectUrl","getItem","removeItem","console","log","replace"],"sourceRoot":""}
@@ -0,0 +1 @@
1
+ export declare const getServerToken: (scopes: string[]) => Promise<string>;
package/lib/server.js ADDED
@@ -0,0 +1,2 @@
1
+ !function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.snokam=t():e.snokam=t()}(this,(()=>(()=>{"use strict";var e={d:(t,n)=>{for(var o in n)e.o(n,o)&&!e.o(t,o)&&Object.defineProperty(t,o,{enumerable:!0,get:n[o]})},o:(e,t)=>Object.prototype.hasOwnProperty.call(e,t),r:e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})}},t={};e.r(t),e.d(t,{getServerToken:()=>o});const n=require("@azure/msal-node");const o=e=>{return t=void 0,o=void 0,i=function*(){if(!process.env.NEXT_PUBLIC_AZURE_AD_CLIENT_ID)throw new Error("NEXT_PUBLIC_AZURE_AD_CLIENT_ID must be set in the environment variables");if(!process.env.NEXT_PUBLIC_AZURE_AD_TENANT_ID)throw new Error("NEXT_PUBLIC_AZURE_AD_TENANT_ID must be set in the environment variables");if(!process.env.AZURE_AD_SECRET)throw new Error("AZURE_AD_SECRET must be set in the environment variables");const t={auth:{clientId:`${process.env.NEXT_PUBLIC_AZURE_AD_CLIENT_ID}`,authority:`https://login.microsoftonline.com/${process.env.NEXT_PUBLIC_AZURE_AD_TENANT_ID}/oauth2/v2.0`,clientSecret:`${process.env.AZURE_AD_SECRET}`}},o=new n.ConfidentialClientApplication(t),r=yield o.acquireTokenByClientCredential({scopes:e.map((e=>e.replace("user_impersonation",".default")))});return`Bearer ${null==r?void 0:r.accessToken}`},new((r=void 0)||(r=Promise))((function(e,n){function s(e){try{a(i.next(e))}catch(e){n(e)}}function c(e){try{a(i.throw(e))}catch(e){n(e)}}function a(t){var n;t.done?e(t.value):(n=t.value,n instanceof r?n:new r((function(e){e(n)}))).then(s,c)}a((i=i.apply(t,o||[])).next())}));var t,o,r,i};return t})()));
2
+ //# sourceMappingURL=server.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"server.js","mappings":"CAAA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W,KAFgEC,OAUP,KAR9CA,EAAIC,WAAU,SAAUC,EAASC,GAC/C,SAASC,EAAU/B,GAAS,IAAMgC,EAAKzB,EAAU0B,KAAKjC,GAAS,CAAE,MAAOkC,GAAKJ,EAAOI,EAAI,CAAE,CAC1F,SAASC,EAASnC,GAAS,IAAMgC,EAAKzB,EAAiB,MAAEP,GAAS,CAAE,MAAOkC,GAAKJ,EAAOI,EAAI,CAAE,CAC7F,SAASF,EAAKI,GAJlB,IAAepC,EAIaoC,EAAOC,KAAOR,EAAQO,EAAOpC,QAJ1CA,EAIyDoC,EAAOpC,MAJhDA,aAAiB2B,EAAI3B,EAAQ,IAAI2B,GAAE,SAAUE,GAAWA,EAAQ7B,EAAQ,KAIjBsC,KAAKP,EAAWI,EAAW,CAC7GH,GAAMzB,EAAYA,EAAUgC,MAAMlC,EAASC,GAAc,KAAK2B,OAClE,IAPwC,IAAU5B,EAASC,EAAYqB,EAAGpB,CAgC5E,E","sources":["webpack://snokam/webpack/universalModuleDefinition","webpack://snokam/webpack/bootstrap","webpack://snokam/webpack/runtime/define property getters","webpack://snokam/webpack/runtime/hasOwnProperty shorthand","webpack://snokam/webpack/runtime/make namespace object","webpack://snokam/external commonjs \"@azure/msal-node\"","webpack://snokam/./src/server.tsx"],"sourcesContent":["(function webpackUniversalModuleDefinition(root, factory) {\n\tif(typeof exports === 'object' && typeof module === 'object')\n\t\tmodule.exports = factory();\n\telse if(typeof define === 'function' && define.amd)\n\t\tdefine([], factory);\n\telse if(typeof exports === 'object')\n\t\texports[\"snokam\"] = factory();\n\telse\n\t\troot[\"snokam\"] = factory();\n})(this, () => {\nreturn ","// The require scope\nvar __webpack_require__ = {};\n\n","// define getter functions for harmony exports\n__webpack_require__.d = (exports, definition) => {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))","// define __esModule on exports\n__webpack_require__.r = (exports) => {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","const __WEBPACK_NAMESPACE_OBJECT__ = require(\"@azure/msal-node\");","var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nimport { ConfidentialClientApplication } from \"@azure/msal-node\";\nexport const getServerToken = (scopes) => __awaiter(void 0, void 0, void 0, function* () {\n if (!process.env.NEXT_PUBLIC_AZURE_AD_CLIENT_ID) {\n throw new Error(\"NEXT_PUBLIC_AZURE_AD_CLIENT_ID must be set in the environment variables\");\n }\n if (!process.env.NEXT_PUBLIC_AZURE_AD_TENANT_ID) {\n throw new Error(\"NEXT_PUBLIC_AZURE_AD_TENANT_ID must be set in the environment variables\");\n }\n if (!process.env.AZURE_AD_SECRET) {\n throw new Error(\"AZURE_AD_SECRET must be set in the environment variables\");\n }\n const config = {\n auth: {\n clientId: `${process.env.NEXT_PUBLIC_AZURE_AD_CLIENT_ID}`,\n authority: `https://login.microsoftonline.com/${process.env.NEXT_PUBLIC_AZURE_AD_TENANT_ID}/oauth2/v2.0`,\n clientSecret: `${process.env.AZURE_AD_SECRET}`,\n },\n };\n const cca = new ConfidentialClientApplication(config);\n const response = yield cca.acquireTokenByClientCredential({\n scopes: scopes.map((scope) => scope.replace(\"user_impersonation\", \".default\")),\n });\n return `Bearer ${response === null || response === void 0 ? void 0 : response.accessToken}`;\n});\n"],"names":["root","factory","exports","module","define","amd","this","__webpack_require__","definition","key","o","Object","defineProperty","enumerable","get","obj","prop","prototype","hasOwnProperty","call","Symbol","toStringTag","value","require","getServerToken","scopes","__awaiter","thisArg","_arguments","generator","process","env","NEXT_PUBLIC_AZURE_AD_CLIENT_ID","Error","NEXT_PUBLIC_AZURE_AD_TENANT_ID","AZURE_AD_SECRET","config","auth","clientId","authority","clientSecret","cca","ConfidentialClientApplication","response","acquireTokenByClientCredential","map","scope","replace","accessToken","P","Promise","resolve","reject","fulfilled","step","next","e","rejected","result","done","then","apply"],"sourceRoot":""}
@@ -0,0 +1,3 @@
1
+ export declare const storeCurrentPath: () => void;
2
+ export declare const getStoredPath: () => string;
3
+ export declare const clearStoredPath: () => void;
package/lib/types.d.ts CHANGED
@@ -1,5 +1,9 @@
1
- import { ConfigurationParameters } from "./client";
2
- export interface AuthProps extends ConfigurationParameters {
3
- basePath: string;
4
- withAuth?: boolean;
1
+ import { ReactNode } from "react";
2
+ export declare namespace Auth {
3
+ namespace Provider {
4
+ interface Props {
5
+ children: ReactNode;
6
+ enforceLogin?: boolean;
7
+ }
8
+ }
5
9
  }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@snokam/auth",
3
- "description": "Utility functions for authentication",
4
- "version": "1.1.5",
3
+ "description": "Snøkam auth components",
4
+ "version": "2.0.1-alpha.0",
5
5
  "main": "lib/index.js",
6
6
  "typings": "lib/index.d.ts",
7
7
  "files": [
@@ -15,17 +15,47 @@
15
15
  "directory": "@snokam/auth"
16
16
  },
17
17
  "scripts": {
18
- "start": "webpack --watch --config=../../webpack/webpack.dev.js",
19
- "build": "webpack --config=../../webpack/webpack.prod.js",
20
- "build:doc": "webpack --config=../../webpack/webpack.dev.js",
18
+ "start": "webpack --watch --config=../../../webpack/webpack.dev.js",
19
+ "build": "webpack --config=../../../webpack/webpack.prod.js",
20
+ "build:doc": "webpack --config=../../../webpack/webpack.dev.js",
21
21
  "clean": "rm -rf lib"
22
22
  },
23
23
  "publishConfig": {
24
24
  "access": "public"
25
25
  },
26
26
  "dependencies": {
27
- "@azure/msal-react": "^2.0.21",
28
- "@snokam/employees-client": "^1.0.4"
27
+ "@azure/msal-browser": "^3.21.0",
28
+ "@azure/msal-node": "^2.13.0",
29
+ "@azure/msal-react": "^2.0.22",
30
+ "@emotion/react": "^11.13.0",
31
+ "@emotion/styled": "^11.13.0",
32
+ "@mui/material": "^6.0.2",
33
+ "@snokam/core": "^1.2.1-alpha.0"
29
34
  },
30
- "gitHead": "65cd5c5dbcec237eb1e5ed0dda22df120028a425"
35
+ "peerDependencies": {
36
+ "next": "^14.0.0",
37
+ "react": "^18.0.0",
38
+ "react-dom": "^18.0.0"
39
+ },
40
+ "exports": {
41
+ ".": {
42
+ "import": "./lib/index.js",
43
+ "types": "./lib/index.d.ts"
44
+ },
45
+ "./server": {
46
+ "import": "./lib/server.js",
47
+ "types": "./lib/server.d.ts"
48
+ }
49
+ },
50
+ "typesVersions": {
51
+ "*": {
52
+ "*": [
53
+ "lib/index.d.ts"
54
+ ],
55
+ "server": [
56
+ "lib/server.d.ts"
57
+ ]
58
+ }
59
+ },
60
+ "gitHead": "3f945eb01c1dd300b4d50e9df5c8bebc128ad8a7"
31
61
  }
package/lib/client.d.ts DELETED
@@ -1,3 +0,0 @@
1
- import { Configuration, ConfigurationParameters } from "@snokam/employees-client";
2
- export { Configuration };
3
- export type { ConfigurationParameters };
package/lib/client.js DELETED
@@ -1,2 +0,0 @@
1
- !function(e,o){"object"==typeof exports&&"object"==typeof module?module.exports=o():"function"==typeof define&&define.amd?define([],o):"object"==typeof exports?exports.snokam=o():e.snokam=o()}(this,(()=>(()=>{"use strict";var e={d:(o,t)=>{for(var r in t)e.o(t,r)&&!e.o(o,r)&&Object.defineProperty(o,r,{enumerable:!0,get:t[r]})},o:(e,o)=>Object.prototype.hasOwnProperty.call(e,o),r:e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})}},o={};e.r(o),e.d(o,{Configuration:()=>t.Configuration});const t=require("@snokam/employees-client");return o})()));
2
- //# sourceMappingURL=client.js.map
package/lib/client.js.map DELETED
@@ -1 +0,0 @@
1
- {"version":3,"file":"client.js","mappings":"CAAA,SAA2CA,EAAMC,GAC1B,iBAAZC,SAA0C,iBAAXC,OACxCA,OAAOD,QAAUD,IACQ,mBAAXG,QAAyBA,OAAOC,IAC9CD,OAAO,GAAIH,GACe,iBAAZC,QACdA,QAAgB,OAAID,IAEpBD,EAAa,OAAIC,GAClB,CATD,CASGK,MAAM,I,mBCRT,IAAIC,EAAsB,CCA1BA,EAAwB,CAACL,EAASM,KACjC,IAAI,IAAIC,KAAOD,EACXD,EAAoBG,EAAEF,EAAYC,KAASF,EAAoBG,EAAER,EAASO,IAC5EE,OAAOC,eAAeV,EAASO,EAAK,CAAEI,YAAY,EAAMC,IAAKN,EAAWC,IAE1E,ECNDF,EAAwB,CAACQ,EAAKC,IAAUL,OAAOM,UAAUC,eAAeC,KAAKJ,EAAKC,GCClFT,EAAyBL,IACH,oBAAXkB,QAA0BA,OAAOC,aAC1CV,OAAOC,eAAeV,EAASkB,OAAOC,YAAa,CAAEC,MAAO,WAE7DX,OAAOC,eAAeV,EAAS,aAAc,CAAEoB,OAAO,GAAO,G,uDCL9D,MAAM,EAA+BC,QAAQ,4B","sources":["webpack://snokam/webpack/universalModuleDefinition","webpack://snokam/webpack/bootstrap","webpack://snokam/webpack/runtime/define property getters","webpack://snokam/webpack/runtime/hasOwnProperty shorthand","webpack://snokam/webpack/runtime/make namespace object","webpack://snokam/external commonjs \"@snokam/employees-client\""],"sourcesContent":["(function webpackUniversalModuleDefinition(root, factory) {\n\tif(typeof exports === 'object' && typeof module === 'object')\n\t\tmodule.exports = factory();\n\telse if(typeof define === 'function' && define.amd)\n\t\tdefine([], factory);\n\telse if(typeof exports === 'object')\n\t\texports[\"snokam\"] = factory();\n\telse\n\t\troot[\"snokam\"] = factory();\n})(this, () => {\nreturn ","// The require scope\nvar __webpack_require__ = {};\n\n","// define getter functions for harmony exports\n__webpack_require__.d = (exports, definition) => {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))","// define __esModule on exports\n__webpack_require__.r = (exports) => {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","const __WEBPACK_NAMESPACE_OBJECT__ = require(\"@snokam/employees-client\");"],"names":["root","factory","exports","module","define","amd","this","__webpack_require__","definition","key","o","Object","defineProperty","enumerable","get","obj","prop","prototype","hasOwnProperty","call","Symbol","toStringTag","value","require"],"sourceRoot":""}
package/lib/types.js DELETED
@@ -1,2 +0,0 @@
1
- !function(e,o){"object"==typeof exports&&"object"==typeof module?module.exports=o():"function"==typeof define&&define.amd?define([],o):"object"==typeof exports?exports.snokam=o():e.snokam=o()}(this,(()=>(()=>{"use strict";var e={};return(e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})})(e),e})()));
2
- //# sourceMappingURL=types.js.map
package/lib/types.js.map DELETED
@@ -1 +0,0 @@
1
- {"version":3,"file":"types.js","mappings":"CAAA,SAA2CA,EAAMC,GAC1B,iBAAZC,SAA0C,iBAAXC,OACxCA,OAAOD,QAAUD,IACQ,mBAAXG,QAAyBA,OAAOC,IAC9CD,OAAO,GAAIH,GACe,iBAAZC,QACdA,QAAgB,OAAID,IAEpBD,EAAa,OAAIC,GAClB,CATD,CASGK,MAAM,I,mBCRT,I,WCAwB,CAACJ,IACH,oBAAXK,QAA0BA,OAAOC,aAC1CC,OAAOC,eAAeR,EAASK,OAAOC,YAAa,CAAEG,MAAO,WAE7DF,OAAOC,eAAeR,EAAS,aAAc,CAAES,OAAO,GAAO,E","sources":["webpack://snokam/webpack/universalModuleDefinition","webpack://snokam/webpack/bootstrap","webpack://snokam/webpack/runtime/make namespace object"],"sourcesContent":["(function webpackUniversalModuleDefinition(root, factory) {\n\tif(typeof exports === 'object' && typeof module === 'object')\n\t\tmodule.exports = factory();\n\telse if(typeof define === 'function' && define.amd)\n\t\tdefine([], factory);\n\telse if(typeof exports === 'object')\n\t\texports[\"snokam\"] = factory();\n\telse\n\t\troot[\"snokam\"] = factory();\n})(this, () => {\nreturn ","// The require scope\nvar __webpack_require__ = {};\n\n","// define __esModule on exports\n__webpack_require__.r = (exports) => {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};"],"names":["root","factory","exports","module","define","amd","this","Symbol","toStringTag","Object","defineProperty","value"],"sourceRoot":""}