@snokam/auth 2.0.48 → 2.0.49
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 +13 -0
- package/lib/server.js +1 -1
- package/lib/server.js.map +1 -1
- package/package.json +6 -6
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,19 @@
|
|
|
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
|
+
## [2.0.49](https://github.com/snokam/components/compare/@snokam/auth@2.0.48...@snokam/auth@2.0.49) (2025-01-24)
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
### Bug Fixes
|
|
10
|
+
|
|
11
|
+
* catch error ([848c5f1](https://github.com/snokam/components/commit/848c5f15adb67a2a913ae63b09d88d46e4f90c7d))
|
|
12
|
+
* throw e ([0312dd2](https://github.com/snokam/components/commit/0312dd21c1cf9d0b02e5ea02abf0fd09742c6808))
|
|
13
|
+
* update deps, update to new sanity client ([6d14a59](https://github.com/snokam/components/commit/6d14a59caf1dbcb829a47e1adff6711522a525d0))
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
|
|
6
19
|
## [2.0.48](https://github.com/snokam/components/compare/@snokam/auth@2.0.47...@snokam/auth@2.0.48) (2025-01-17)
|
|
7
20
|
|
|
8
21
|
**Note:** Version bump only for package @snokam/auth
|
package/lib/server.js
CHANGED
|
@@ -1,2 +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,o)=>{for(var n in o)e.o(o,n)&&!e.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:o[n]})},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:()=>n});const o=require("@azure/msal-node");const n=e=>{return t=void 0,n=void 0,i=function*(){const{scopes:t}=e,n={auth:{clientId:`${e.clientId}`,authority:`https://login.microsoftonline.com/${e.tenantId}/oauth2/v2.0`,clientSecret:`${e.secret}`}},r=new o.ConfidentialClientApplication(n),i=yield r.acquireTokenByClientCredential({scopes:t.map((e=>e.replace("user_impersonation",".default")))});return`Bearer ${null==i?void 0:i.accessToken}`},new((r=void 0)||(r=Promise))((function(e,o){function c(e){try{l(i.next(e))}catch(e){o(e)}}function a(e){try{l(i.throw(e))}catch(e){o(e)}}function l(t){var o;t.done?e(t.value):(o=t.value,o instanceof r?o:new r((function(e){e(o)}))).then(c,a)}l((i=i.apply(t,n||[])).next())}));var t,n,r,i};return t})()));
|
|
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,o)=>{for(var n in o)e.o(o,n)&&!e.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:o[n]})},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:()=>n});const o=require("@azure/msal-node");const n=e=>{return t=void 0,n=void 0,i=function*(){const{scopes:t}=e,n={auth:{clientId:`${e.clientId}`,authority:`https://login.microsoftonline.com/${e.tenantId}/oauth2/v2.0`,clientSecret:`${e.secret}`}},r=new o.ConfidentialClientApplication(n),i=yield r.acquireTokenByClientCredential({scopes:t.map((e=>e.replace("user_impersonation",".default")))}).catch((e=>{throw console.error(e),e}));return`Bearer ${null==i?void 0:i.accessToken}`},new((r=void 0)||(r=Promise))((function(e,o){function c(e){try{l(i.next(e))}catch(e){o(e)}}function a(e){try{l(i.throw(e))}catch(e){o(e)}}function l(t){var o;t.done?e(t.value):(o=t.value,o instanceof r?o:new r((function(e){e(o)}))).then(c,a)}l((i=i.apply(t,n||[])).next())}));var t,n,r,i};return t})()));
|
|
2
2
|
//# sourceMappingURL=server.js.map
|
package/lib/server.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"server.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,0CCL9D,MAAM,EAA+BC,QAAQ,oBCUtC,MAAMC,EAAkBC,IAAUC,OAVaC,OAUH,EAVYC,OAUJ,EAVmBC,EAUH,YACvE,MAAM,OAAEC,GAAWL,EACbM,EAAS,CACXC,KAAM,CACFC,SAAU,GAAGR,EAAMQ,WACnBC,UAAW,qCAAqCT,EAAMU,uBACtDC,aAAc,GAAGX,EAAMY,WAGzBC,EA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AU,SAAUC,EAASC,GAC/C,SAASC,EAAUhC,GAAS,IAAMiC,EAAK1B,EAAU2B,KAAKlC,GAAS,CAAE,MAAOwB,GAAKO,EAAOP,EAAI,CAAE,CAC1F,SAASW,EAASnC,GAAS,IAAMiC,EAAK1B,EAAiB,MAAEP,GAAS,CAAE,MAAOwB,GAAKO,EAAOP,EAAI,CAAE,CAC7F,SAASS,EAAKG,GAJlB,IAAepC,EAIaoC,EAAOC,KAAOP,EAAQM,EAAOpC,QAJ1CA,EAIyDoC,EAAOpC,MAJhDA,aAAiB4B,EAAI5B,EAAQ,IAAI4B,GAAE,SAAUE,GAAWA,EAAQ9B,EAAQ,KAIjBsC,KAAKN,EAAWG,EAAW,CAC7GF,GAAM1B,EAAYA,EAAUgC,MAAMlC,EAASC,GAAc,KAAK4B,OAClE,IAPwC,IAAU7B,EAASC,EAAYsB,EAAGrB,CA6B5E,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 = (props) => __awaiter(void 0, void 0, void 0, function* () {\n const { scopes } = props;\n const config = {\n auth: {\n clientId: `${props.clientId}`,\n authority: `https://login.microsoftonline.com/${props.tenantId}/oauth2/v2.0`,\n clientSecret: `${props.secret}`,\n },\n };\n const cca = new ConfidentialClientApplication(config);\n const response = yield cca\n .acquireTokenByClientCredential({\n scopes: scopes.map((scope) => scope.replace(\"user_impersonation\", \".default\")),\n })\n .catch((e) => {\n console.error(e);\n throw e;\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","props","__awaiter","thisArg","_arguments","generator","scopes","config","auth","clientId","authority","tenantId","clientSecret","secret","cca","ConfidentialClientApplication","response","acquireTokenByClientCredential","map","scope","replace","catch","e","console","error","accessToken","P","Promise","resolve","reject","fulfilled","step","next","rejected","result","done","then","apply"],"sourceRoot":""}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@snokam/auth",
|
|
3
3
|
"description": "Snøkam auth components",
|
|
4
|
-
"version": "2.0.
|
|
4
|
+
"version": "2.0.49",
|
|
5
5
|
"main": "lib/index.js",
|
|
6
6
|
"typings": "lib/index.d.ts",
|
|
7
7
|
"files": [
|
|
@@ -24,12 +24,12 @@
|
|
|
24
24
|
"access": "public"
|
|
25
25
|
},
|
|
26
26
|
"dependencies": {
|
|
27
|
-
"@azure/msal-browser": "^4.0.
|
|
28
|
-
"@azure/msal-node": "^3.0
|
|
29
|
-
"@azure/msal-react": "^3.0.
|
|
27
|
+
"@azure/msal-browser": "^4.0.2",
|
|
28
|
+
"@azure/msal-node": "^3.1.0",
|
|
29
|
+
"@azure/msal-react": "^3.0.2",
|
|
30
30
|
"@emotion/react": "^11.14.0",
|
|
31
31
|
"@emotion/styled": "^11.14.0",
|
|
32
|
-
"@mui/material": "^6.4.
|
|
32
|
+
"@mui/material": "^6.4.1",
|
|
33
33
|
"@snokam/core": "^1.3.36"
|
|
34
34
|
},
|
|
35
35
|
"peerDependencies": {
|
|
@@ -57,5 +57,5 @@
|
|
|
57
57
|
]
|
|
58
58
|
}
|
|
59
59
|
},
|
|
60
|
-
"gitHead": "
|
|
60
|
+
"gitHead": "0b3d8f72d1ff104cfa3ab796d1cc83eb43733733"
|
|
61
61
|
}
|