@tachybase/plugin-auth-oidc 1.3.20 → 1.3.22
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/client/index.js +2 -2
- package/dist/externalVersion.js +7 -9
- package/dist/node_modules/nanoid/async/index.browser.js +0 -35
- package/dist/node_modules/nanoid/async/index.js +0 -36
- package/dist/node_modules/nanoid/async/index.native.js +0 -31
- package/dist/node_modules/nanoid/index.browser.js +0 -38
- package/dist/node_modules/nanoid/index.cjs +1 -1
- package/dist/node_modules/nanoid/index.js +0 -40
- package/dist/node_modules/nanoid/non-secure/index.js +0 -13
- package/dist/node_modules/nanoid/package.json +1 -1
- package/dist/node_modules/nanoid/url-alphabet/index.js +0 -4
- package/dist/node_modules/openid-client/package.json +1 -1
- package/dist/server/actions/getAuthUrl.d.ts +1 -1
- package/dist/server/actions/redirect.d.ts +1 -1
- package/dist/server/actions/redirect.js +1 -1
- package/dist/server/migrations/20231007124508-update-autosignup.d.ts +1 -1
- package/dist/server/migrations/20231007124508-update-autosignup.js +1 -1
- package/dist/server/oidc-auth.d.ts +3 -3
- package/dist/server/oidc-auth.js +4 -4
- package/dist/server/plugin.d.ts +1 -1
- package/dist/server/plugin.js +3 -3
- package/package.json +12 -19
- package/dist/node_modules/nanoid/.devcontainer.json +0 -23
package/dist/client/index.js
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
(function(e,o){typeof exports=="object"&&typeof module!="undefined"?o(exports,require("@tachybase/client"),require("@tachybase/module-auth/client"),require("react/jsx-runtime"),require("react"),require("@ant-design/icons"),require("antd"),require("react-router-dom"),require("react-i18next"),require("@tachybase/
|
|
1
|
+
(function(e,o){typeof exports=="object"&&typeof module!="undefined"?o(exports,require("@tachybase/client"),require("@tachybase/module-auth/client"),require("react/jsx-runtime"),require("react"),require("@ant-design/icons"),require("antd"),require("react-router-dom"),require("react-i18next"),require("@tachybase/schema"),require("@tego/client")):typeof define=="function"&&define.amd?define(["exports","@tachybase/client","@tachybase/module-auth/client","react/jsx-runtime","react","@ant-design/icons","antd","react-router-dom","react-i18next","@tachybase/schema","@tego/client"],o):(e=typeof globalThis!="undefined"?globalThis:e||self,o(e["@tachybase/plugin-auth-oidc"]={},e["@tachybase/client"],e["@tachybase/module-auth"],e.jsxRuntime,e.react,e["@ant-design/icons"],e.antd,e["react-router-dom"],e["react-i18next"],e["@tachybase/schema"],e["@tego/client"]))})(this,function(e,o,l,a,d,y,c,u,n,h,f){"use strict";var v=(e,o,l)=>new Promise((a,d)=>{var y=n=>{try{u(l.next(n))}catch(h){d(h)}},c=n=>{try{u(l.throw(n))}catch(h){d(h)}},u=n=>n.done?a(n.value):Promise.resolve(n.value).then(y,c);u((l=l.apply(e,o)).next())});const k="OIDC",T="oidc";function t(r){return o.i18n.t(r,{ns:T})}function S(){return n.useTranslation(T)}const C=({authenticator:r})=>{const{t:m}=S(),b=o.useAPIClient(),g=u.useLocation(),i=new URLSearchParams(g.search),x=i.get("redirect"),I=()=>v(null,null,function*(){var P;const s=yield b.request({method:"post",url:"oidc:getAuthUrl",headers:{"X-Authenticator":r.name},data:{redirect:x}}),p=(P=s==null?void 0:s.data)==null?void 0:P.data;window.location.replace(p)});return d.useEffect(()=>{const s=i.get("authenticator"),p=i.get("error");if(s===r.name&&p){c.message.error(m(p));return}}),a.jsx(c.Space,{direction:"vertical",className:o.css`
|
|
2
2
|
display: flex;
|
|
3
|
-
`,children:a.jsx(c.Button,{shape:"round",block:!0,icon:a.jsx(
|
|
3
|
+
`,children:a.jsx(c.Button,{shape:"round",block:!0,icon:a.jsx(y.LoginOutlined,{}),onClick:I,children:m(r.title)})})},A={type:"object",properties:{public:{type:"object",properties:{autoSignup:{"x-decorator":"FormItem",type:"boolean",title:'{{t("Sign up automatically when the user does not exist")}}',"x-component":"Checkbox",default:!0}}},oidc:{type:"object",properties:{collapse:{type:"void","x-component":"FormTab",properties:{basic:{type:"void","x-component":"FormTab.TabPane","x-component-props":{tab:t("Basic configuration")},properties:{issuer:{type:"string",title:'{{t("Issuer")}}',"x-component":"Input","x-decorator":"FormItem",required:!0},clientId:{type:"string",title:'{{t("Client ID")}}',"x-component":"Input","x-decorator":"FormItem",required:!0},clientSecret:{type:"string",title:'{{t("Client Secret")}}',"x-component":"Input","x-decorator":"FormItem",required:!0},scope:{type:"string",title:'{{t("scope")}}',"x-component":"Input","x-decorator":"FormItem","x-decorator-props":{tooltip:'{{t("Default: openid profile email")}}'}},idTokenSignedResponseAlg:{type:"string",title:'{{t("id_token signed response algorithm")}}',"x-component":"Select","x-decorator":"FormItem",enum:[{label:"HS256",value:"HS256"},{label:"HS384",value:"HS384"},{label:"HS512",value:"HS512"},{label:"RS256",value:"RS256"},{label:"RS384",value:"RS384"},{label:"RS512",value:"RS512"},{label:"ES256",value:"ES256"},{label:"ES384",value:"ES384"},{label:"ES512",value:"ES512"},{label:"PS256",value:"PS256"},{label:"PS384",value:"PS384"},{label:"PS512",value:"PS512"}]}}},mapping:{type:"void","x-component":"FormTab.TabPane","x-component-props":{tab:t("Field mapping")},properties:{fieldMap:{title:'{{t("Field Map")}}',type:"array","x-decorator":"FormItem","x-component":"ArrayItems",items:{type:"object","x-decorator":"ArrayItems.Item",properties:{space:{type:"void","x-component":"Space",properties:{source:{type:"string","x-decorator":"FormItem","x-component":"Input","x-component-props":{placeholder:'{{t("source")}}'}},target:{type:"string","x-decorator":"FormItem","x-component":"Select","x-component-props":{placeholder:'{{t("target")}}'},enum:[{label:t("Nickname"),value:"nickname"},{label:t("Email"),value:"email"},{label:t("Phone"),value:"phone"},{label:t("Username"),value:"username"}]},remove:{type:"void","x-decorator":"FormItem","x-component":"ArrayItems.Remove"}}}}},properties:{add:{type:"void",title:"Add","x-component":"ArrayItems.Addition"}}},userBindField:{type:"string",title:'{{t("Use this field to bind the user")}}',"x-component":"Select","x-decorator":"FormItem",default:"email",enum:[{label:t("Email"),value:"email"},{label:t("Username"),value:"username"}],required:!0}}},advanced:{type:"void","x-component":"FormTab.TabPane","x-component-props":{tab:t("Advanced configuration")},properties:{http:{type:"boolean",title:'{{t("HTTP")}}',"x-component":"Checkbox","x-decorator":"FormItem","x-decorator-props":{tooltip:'{{t("Check if TachyBase is running on HTTP protocol")}}'}},port:{type:"number",title:'{{t("Port")}}',"x-component":"InputNumber","x-decorator":"FormItem","x-decorator-props":{tooltip:'{{t("The port number of the TachyBase service if it is not 80 or 443")}}'},"x-component-props":{style:{width:"15%",minWidth:"100px"}}},stateToken:{type:"string",title:'{{t("State token")}}',"x-component":"Input","x-decorator":"FormItem",description:t("The state token helps prevent CSRF attacks. It's recommended to leave it blank for automatic random generation.")},exchangeBodyKeys:{type:"array",title:'{{t("Pass parameters in the authorization code grant exchange")}}',"x-decorator":"FormItem","x-component":"ArrayItems",default:[{paramName:"",optionsKey:"clientId"},{paramName:"",optionsKey:"clientSecret"}],items:{type:"object","x-decorator":"ArrayItems.Item",properties:{space:{type:"void","x-component":"Space",properties:{enabled:{type:"boolean","x-decorator":"FormItem","x-component":"Checkbox"},optionsKey:{type:"string","x-decorator":"FormItem","x-decorator-props":{style:{width:"100px"}},"x-component":"Select","x-read-pretty":!0,enum:[{label:t("Client ID"),value:"clientId"},{label:t("Client Secret"),value:"clientSecret"}]},paramName:{type:"string","x-decorator":"FormItem","x-component":"Input","x-component-props":{placeholder:'{{t("Parameter name")}}'}}}}}}},userInfoMethod:{type:"string",title:'{{t("Method to call the user info endpoint")}}',"x- decorator":"FormItem","x-component":"Radio.Group",default:"GET",enum:[{label:"GET",value:"GET"},{label:"POST",value:"POST"}],"x-reactions":[{dependencies:[".accessTokenVia"],when:'{{$deps[0] === "query"}}',fulfill:{state:{value:"GET"}}},{dependencies:[".accessTokenVia"],when:'{{$deps[0] === "body"}}',fulfill:{state:{value:"POST"}}}]},accessTokenVia:{type:"string",title:'{{t("Where to put the access token when calling the user info endpoint")}}',"x- decorator":"FormItem","x-component":"Radio.Group",default:"header",enum:[{label:t("Header"),value:"header"},{label:t("Body (Use with POST method)"),value:"body"},{label:t("Query parameters (Use with GET method)"),value:"query"}]}}}}}}},usage:{type:"void","x-component":"Usage"}}},q=h.observer(()=>{const{t:r}=S(),m=o.useApp(),b=d.useMemo(()=>{var p;const i=m.getOptions(),x=(p=i==null?void 0:i.apiClient)==null?void 0:p.baseURL,{protocol:I,host:s}=window.location;return x.startsWith("http")?`${x}oidc:redirect`:`${I}//${s}${x}oidc:redirect`},[m]),g=i=>{navigator.clipboard.writeText(i),c.message.success(r("Copied"))};return a.jsx(c.Card,{title:r("Usage"),type:"inner",children:a.jsx(o.FormItem,{label:r("Redirect URL"),children:a.jsx(o.Input,{value:b,disabled:!0,addonBefore:a.jsx(y.CopyOutlined,{onClick:()=>g(b)})})})})},{displayName:"Usage"}),E=()=>{const{t:r}=S();return a.jsx(o.SchemaComponent,{scope:{t:r},components:{Usage:q,ArrayItems:f.ArrayItems,Space:c.Space,FormTab:f.FormTab},schema:A})};class F extends o.Plugin{load(){return v(this,null,function*(){this.app.pm.get(l).registerType(k,{components:{SignInButton:C,AdminSettingsForm:E}})})}}e.OidcPlugin=F,e.default=F,Object.defineProperties(e,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
|
package/dist/externalVersion.js
CHANGED
|
@@ -1,14 +1,12 @@
|
|
|
1
1
|
module.exports = {
|
|
2
2
|
"react": "18.3.1",
|
|
3
|
-
"@tachybase/client": "1.3.
|
|
4
|
-
"@tachybase/module-auth": "1.3.
|
|
5
|
-
"@ant-design/icons": "5.
|
|
3
|
+
"@tachybase/client": "1.3.22",
|
|
4
|
+
"@tachybase/module-auth": "1.3.22",
|
|
5
|
+
"@ant-design/icons": "5.6.1",
|
|
6
6
|
"antd": "5.22.5",
|
|
7
7
|
"react-router-dom": "6.28.1",
|
|
8
|
-
"@tachybase/
|
|
9
|
-
"@
|
|
10
|
-
"@
|
|
11
|
-
"
|
|
12
|
-
"react-i18next": "15.2.0",
|
|
13
|
-
"@tachybase/actions": "1.3.20"
|
|
8
|
+
"@tachybase/schema": "1.3.39",
|
|
9
|
+
"@tego/client": "1.3.39",
|
|
10
|
+
"@tego/server": "1.3.39",
|
|
11
|
+
"react-i18next": "15.2.0"
|
|
14
12
|
};
|
|
@@ -1,61 +1,27 @@
|
|
|
1
1
|
let random = async bytes => crypto.getRandomValues(new Uint8Array(bytes))
|
|
2
|
-
|
|
3
2
|
let customAlphabet = (alphabet, defaultSize = 21) => {
|
|
4
|
-
// First, a bitmask is necessary to generate the ID. The bitmask makes bytes
|
|
5
|
-
// values closer to the alphabet size. The bitmask calculates the closest
|
|
6
|
-
// `2^31 - 1` number, which exceeds the alphabet size.
|
|
7
|
-
// For example, the bitmask for the alphabet size 30 is 31 (00011111).
|
|
8
|
-
// `Math.clz32` is not used, because it is not available in browsers.
|
|
9
3
|
let mask = (2 << (Math.log(alphabet.length - 1) / Math.LN2)) - 1
|
|
10
|
-
// Though, the bitmask solution is not perfect since the bytes exceeding
|
|
11
|
-
// the alphabet size are refused. Therefore, to reliably generate the ID,
|
|
12
|
-
// the random bytes redundancy has to be satisfied.
|
|
13
|
-
|
|
14
|
-
// Note: every hardware random generator call is performance expensive,
|
|
15
|
-
// because the system call for entropy collection takes a lot of time.
|
|
16
|
-
// So, to avoid additional system calls, extra bytes are requested in advance.
|
|
17
|
-
|
|
18
|
-
// Next, a step determines how many random bytes to generate.
|
|
19
|
-
// The number of random bytes gets decided upon the ID size, mask,
|
|
20
|
-
// alphabet size, and magic number 1.6 (using 1.6 peaks at performance
|
|
21
|
-
// according to benchmarks).
|
|
22
|
-
|
|
23
|
-
// `-~f => Math.ceil(f)` if f is a float
|
|
24
|
-
// `-~i => i + 1` if i is an integer
|
|
25
4
|
let step = -~((1.6 * mask * defaultSize) / alphabet.length)
|
|
26
|
-
|
|
27
5
|
return async (size = defaultSize) => {
|
|
28
6
|
let id = ''
|
|
29
7
|
while (true) {
|
|
30
8
|
let bytes = crypto.getRandomValues(new Uint8Array(step))
|
|
31
|
-
// A compact alternative for `for (var i = 0; i < step; i++)`.
|
|
32
9
|
let i = step | 0
|
|
33
10
|
while (i--) {
|
|
34
|
-
// Adding `|| ''` refuses a random byte that exceeds the alphabet size.
|
|
35
11
|
id += alphabet[bytes[i] & mask] || ''
|
|
36
12
|
if (id.length === size) return id
|
|
37
13
|
}
|
|
38
14
|
}
|
|
39
15
|
}
|
|
40
16
|
}
|
|
41
|
-
|
|
42
17
|
let nanoid = async (size = 21) => {
|
|
43
18
|
let id = ''
|
|
44
19
|
let bytes = crypto.getRandomValues(new Uint8Array((size |= 0)))
|
|
45
|
-
|
|
46
|
-
// A compact alternative for `for (var i = 0; i < step; i++)`.
|
|
47
20
|
while (size--) {
|
|
48
|
-
// It is incorrect to use bytes exceeding the alphabet size.
|
|
49
|
-
// The following mask reduces the random byte in the 0-255 value
|
|
50
|
-
// range to the 0-63 value range. Therefore, adding hacks, such
|
|
51
|
-
// as empty string fallback or magic numbers, is unneccessary because
|
|
52
|
-
// the bitmask trims bytes down to the alphabet size.
|
|
53
21
|
let byte = bytes[size] & 63
|
|
54
22
|
if (byte < 36) {
|
|
55
|
-
// `0-9a-z`
|
|
56
23
|
id += byte.toString(36)
|
|
57
24
|
} else if (byte < 62) {
|
|
58
|
-
// `A-Z`
|
|
59
25
|
id += (byte - 26).toString(36).toUpperCase()
|
|
60
26
|
} else if (byte < 63) {
|
|
61
27
|
id += '_'
|
|
@@ -65,5 +31,4 @@ let nanoid = async (size = 21) => {
|
|
|
65
31
|
}
|
|
66
32
|
return id
|
|
67
33
|
}
|
|
68
|
-
|
|
69
34
|
export { nanoid, customAlphabet, random }
|
|
@@ -1,14 +1,7 @@
|
|
|
1
1
|
import crypto from 'crypto'
|
|
2
|
-
|
|
3
2
|
import { urlAlphabet } from '../url-alphabet/index.js'
|
|
4
|
-
|
|
5
|
-
// `crypto.randomFill()` is a little faster than `crypto.randomBytes()`,
|
|
6
|
-
// because it is possible to use in combination with `Buffer.allocUnsafe()`.
|
|
7
3
|
let random = bytes =>
|
|
8
4
|
new Promise((resolve, reject) => {
|
|
9
|
-
// `Buffer.allocUnsafe()` is faster because it doesn’t flush the memory.
|
|
10
|
-
// Memory flushing is unnecessary since the buffer allocation itself resets
|
|
11
|
-
// the memory with the new bytes.
|
|
12
5
|
crypto.randomFill(Buffer.allocUnsafe(bytes), (err, buf) => {
|
|
13
6
|
if (err) {
|
|
14
7
|
reject(err)
|
|
@@ -17,55 +10,26 @@ let random = bytes =>
|
|
|
17
10
|
}
|
|
18
11
|
})
|
|
19
12
|
})
|
|
20
|
-
|
|
21
13
|
let customAlphabet = (alphabet, defaultSize = 21) => {
|
|
22
|
-
// First, a bitmask is necessary to generate the ID. The bitmask makes bytes
|
|
23
|
-
// values closer to the alphabet size. The bitmask calculates the closest
|
|
24
|
-
// `2^31 - 1` number, which exceeds the alphabet size.
|
|
25
|
-
// For example, the bitmask for the alphabet size 30 is 31 (00011111).
|
|
26
14
|
let mask = (2 << (31 - Math.clz32((alphabet.length - 1) | 1))) - 1
|
|
27
|
-
// Though, the bitmask solution is not perfect since the bytes exceeding
|
|
28
|
-
// the alphabet size are refused. Therefore, to reliably generate the ID,
|
|
29
|
-
// the random bytes redundancy has to be satisfied.
|
|
30
|
-
|
|
31
|
-
// Note: every hardware random generator call is performance expensive,
|
|
32
|
-
// because the system call for entropy collection takes a lot of time.
|
|
33
|
-
// So, to avoid additional system calls, extra bytes are requested in advance.
|
|
34
|
-
|
|
35
|
-
// Next, a step determines how many random bytes to generate.
|
|
36
|
-
// The number of random bytes gets decided upon the ID size, mask,
|
|
37
|
-
// alphabet size, and magic number 1.6 (using 1.6 peaks at performance
|
|
38
|
-
// according to benchmarks).
|
|
39
15
|
let step = Math.ceil((1.6 * mask * defaultSize) / alphabet.length)
|
|
40
|
-
|
|
41
16
|
let tick = (id, size = defaultSize) =>
|
|
42
17
|
random(step).then(bytes => {
|
|
43
|
-
// A compact alternative for `for (var i = 0; i < step; i++)`.
|
|
44
18
|
let i = step
|
|
45
19
|
while (i--) {
|
|
46
|
-
// Adding `|| ''` refuses a random byte that exceeds the alphabet size.
|
|
47
20
|
id += alphabet[bytes[i] & mask] || ''
|
|
48
21
|
if (id.length >= size) return id
|
|
49
22
|
}
|
|
50
23
|
return tick(id, size)
|
|
51
24
|
})
|
|
52
|
-
|
|
53
25
|
return size => tick('', size)
|
|
54
26
|
}
|
|
55
|
-
|
|
56
27
|
let nanoid = (size = 21) =>
|
|
57
28
|
random((size |= 0)).then(bytes => {
|
|
58
29
|
let id = ''
|
|
59
|
-
// A compact alternative for `for (var i = 0; i < step; i++)`.
|
|
60
30
|
while (size--) {
|
|
61
|
-
// It is incorrect to use bytes exceeding the alphabet size.
|
|
62
|
-
// The following mask reduces the random byte in the 0-255 value
|
|
63
|
-
// range to the 0-63 value range. Therefore, adding hacks, such
|
|
64
|
-
// as empty string fallback or magic numbers, is unneccessary because
|
|
65
|
-
// the bitmask trims bytes down to the alphabet size.
|
|
66
31
|
id += urlAlphabet[bytes[size] & 63]
|
|
67
32
|
}
|
|
68
33
|
return id
|
|
69
34
|
})
|
|
70
|
-
|
|
71
35
|
export { nanoid, customAlphabet, random }
|
|
@@ -1,57 +1,26 @@
|
|
|
1
1
|
import { getRandomBytesAsync } from 'expo-random'
|
|
2
|
-
|
|
3
2
|
import { urlAlphabet } from '../url-alphabet/index.js'
|
|
4
|
-
|
|
5
3
|
let random = getRandomBytesAsync
|
|
6
|
-
|
|
7
4
|
let customAlphabet = (alphabet, defaultSize = 21) => {
|
|
8
|
-
// First, a bitmask is necessary to generate the ID. The bitmask makes bytes
|
|
9
|
-
// values closer to the alphabet size. The bitmask calculates the closest
|
|
10
|
-
// `2^31 - 1` number, which exceeds the alphabet size.
|
|
11
|
-
// For example, the bitmask for the alphabet size 30 is 31 (00011111).
|
|
12
5
|
let mask = (2 << (31 - Math.clz32((alphabet.length - 1) | 1))) - 1
|
|
13
|
-
// Though, the bitmask solution is not perfect since the bytes exceeding
|
|
14
|
-
// the alphabet size are refused. Therefore, to reliably generate the ID,
|
|
15
|
-
// the random bytes redundancy has to be satisfied.
|
|
16
|
-
|
|
17
|
-
// Note: every hardware random generator call is performance expensive,
|
|
18
|
-
// because the system call for entropy collection takes a lot of time.
|
|
19
|
-
// So, to avoid additional system calls, extra bytes are requested in advance.
|
|
20
|
-
|
|
21
|
-
// Next, a step determines how many random bytes to generate.
|
|
22
|
-
// The number of random bytes gets decided upon the ID size, mask,
|
|
23
|
-
// alphabet size, and magic number 1.6 (using 1.6 peaks at performance
|
|
24
|
-
// according to benchmarks).
|
|
25
6
|
let step = Math.ceil((1.6 * mask * defaultSize) / alphabet.length)
|
|
26
|
-
|
|
27
7
|
let tick = (id, size = defaultSize) =>
|
|
28
8
|
random(step).then(bytes => {
|
|
29
|
-
// A compact alternative for `for (var i = 0; i < step; i++)`.
|
|
30
9
|
let i = step
|
|
31
10
|
while (i--) {
|
|
32
|
-
// Adding `|| ''` refuses a random byte that exceeds the alphabet size.
|
|
33
11
|
id += alphabet[bytes[i] & mask] || ''
|
|
34
12
|
if (id.length >= size) return id
|
|
35
13
|
}
|
|
36
14
|
return tick(id, size)
|
|
37
15
|
})
|
|
38
|
-
|
|
39
16
|
return size => tick('', size)
|
|
40
17
|
}
|
|
41
|
-
|
|
42
18
|
let nanoid = (size = 21) =>
|
|
43
19
|
random((size |= 0)).then(bytes => {
|
|
44
20
|
let id = ''
|
|
45
|
-
// A compact alternative for `for (var i = 0; i < step; i++)`.
|
|
46
21
|
while (size--) {
|
|
47
|
-
// It is incorrect to use bytes exceeding the alphabet size.
|
|
48
|
-
// The following mask reduces the random byte in the 0-255 value
|
|
49
|
-
// range to the 0-63 value range. Therefore, adding hacks, such
|
|
50
|
-
// as empty string fallback or magic numbers, is unneccessary because
|
|
51
|
-
// the bitmask trims bytes down to the alphabet size.
|
|
52
22
|
id += urlAlphabet[bytes[size] & 63]
|
|
53
23
|
}
|
|
54
24
|
return id
|
|
55
25
|
})
|
|
56
|
-
|
|
57
26
|
export { nanoid, customAlphabet, random }
|
|
@@ -1,65 +1,28 @@
|
|
|
1
|
-
// This file replaces `index.js` in bundlers like webpack or Rollup,
|
|
2
|
-
// according to `browser` config in `package.json`.
|
|
3
|
-
|
|
4
1
|
import { urlAlphabet } from './url-alphabet/index.js'
|
|
5
|
-
|
|
6
2
|
let random = bytes => crypto.getRandomValues(new Uint8Array(bytes))
|
|
7
|
-
|
|
8
3
|
let customRandom = (alphabet, defaultSize, getRandom) => {
|
|
9
|
-
// First, a bitmask is necessary to generate the ID. The bitmask makes bytes
|
|
10
|
-
// values closer to the alphabet size. The bitmask calculates the closest
|
|
11
|
-
// `2^31 - 1` number, which exceeds the alphabet size.
|
|
12
|
-
// For example, the bitmask for the alphabet size 30 is 31 (00011111).
|
|
13
|
-
// `Math.clz32` is not used, because it is not available in browsers.
|
|
14
4
|
let mask = (2 << (Math.log(alphabet.length - 1) / Math.LN2)) - 1
|
|
15
|
-
// Though, the bitmask solution is not perfect since the bytes exceeding
|
|
16
|
-
// the alphabet size are refused. Therefore, to reliably generate the ID,
|
|
17
|
-
// the random bytes redundancy has to be satisfied.
|
|
18
|
-
|
|
19
|
-
// Note: every hardware random generator call is performance expensive,
|
|
20
|
-
// because the system call for entropy collection takes a lot of time.
|
|
21
|
-
// So, to avoid additional system calls, extra bytes are requested in advance.
|
|
22
|
-
|
|
23
|
-
// Next, a step determines how many random bytes to generate.
|
|
24
|
-
// The number of random bytes gets decided upon the ID size, mask,
|
|
25
|
-
// alphabet size, and magic number 1.6 (using 1.6 peaks at performance
|
|
26
|
-
// according to benchmarks).
|
|
27
|
-
|
|
28
|
-
// `-~f => Math.ceil(f)` if f is a float
|
|
29
|
-
// `-~i => i + 1` if i is an integer
|
|
30
5
|
let step = -~((1.6 * mask * defaultSize) / alphabet.length)
|
|
31
|
-
|
|
32
6
|
return (size = defaultSize) => {
|
|
33
7
|
let id = ''
|
|
34
8
|
while (true) {
|
|
35
9
|
let bytes = getRandom(step)
|
|
36
|
-
// A compact alternative for `for (var i = 0; i < step; i++)`.
|
|
37
10
|
let j = step | 0
|
|
38
11
|
while (j--) {
|
|
39
|
-
// Adding `|| ''` refuses a random byte that exceeds the alphabet size.
|
|
40
12
|
id += alphabet[bytes[j] & mask] || ''
|
|
41
13
|
if (id.length === size) return id
|
|
42
14
|
}
|
|
43
15
|
}
|
|
44
16
|
}
|
|
45
17
|
}
|
|
46
|
-
|
|
47
18
|
let customAlphabet = (alphabet, size = 21) =>
|
|
48
19
|
customRandom(alphabet, size, random)
|
|
49
|
-
|
|
50
20
|
let nanoid = (size = 21) =>
|
|
51
21
|
crypto.getRandomValues(new Uint8Array(size)).reduce((id, byte) => {
|
|
52
|
-
// It is incorrect to use bytes exceeding the alphabet size.
|
|
53
|
-
// The following mask reduces the random byte in the 0-255 value
|
|
54
|
-
// range to the 0-63 value range. Therefore, adding hacks, such
|
|
55
|
-
// as empty string fallback or magic numbers, is unneccessary because
|
|
56
|
-
// the bitmask trims bytes down to the alphabet size.
|
|
57
22
|
byte &= 63
|
|
58
23
|
if (byte < 36) {
|
|
59
|
-
// `0-9a-z`
|
|
60
24
|
id += byte.toString(36)
|
|
61
25
|
} else if (byte < 62) {
|
|
62
|
-
// `A-Z`
|
|
63
26
|
id += (byte - 26).toString(36).toUpperCase()
|
|
64
27
|
} else if (byte > 62) {
|
|
65
28
|
id += '-'
|
|
@@ -68,5 +31,4 @@ let nanoid = (size = 21) =>
|
|
|
68
31
|
}
|
|
69
32
|
return id
|
|
70
33
|
}, '')
|
|
71
|
-
|
|
72
34
|
export { nanoid, customAlphabet, customRandom, urlAlphabet, random }
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(){var e={982:function(e){"use strict";e.exports=require("crypto")},
|
|
1
|
+
(function(){var e={982:function(e){"use strict";e.exports=require("crypto")},701:function(e,t,r){let l=r(982);let{urlAlphabet:n}=r(423);const a=128;let u,i;let fillPool=e=>{if(!u||u.length<e){u=Buffer.allocUnsafe(e*a);l.randomFillSync(u);i=0}else if(i+e>u.length){l.randomFillSync(u);i=0}i+=e};let random=e=>{fillPool(e|=0);return u.subarray(i-e,i)};let customRandom=(e,t,r)=>{let l=(2<<31-Math.clz32(e.length-1|1))-1;let n=Math.ceil(1.6*l*t/e.length);return(a=t)=>{let u="";while(true){let t=r(n);let i=n;while(i--){u+=e[t[i]&l]||"";if(u.length===a)return u}}}};let customAlphabet=(e,t=21)=>customRandom(e,t,random);let nanoid=(e=21)=>{fillPool(e|=0);let t="";for(let r=i-e;r<i;r++){t+=n[u[r]&63]}return t};e.exports={nanoid:nanoid,customAlphabet:customAlphabet,customRandom:customRandom,urlAlphabet:n,random:random}},423:function(e){let t="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict";e.exports={urlAlphabet:t}}};var t={};function __nccwpck_require__(r){var l=t[r];if(l!==undefined){return l.exports}var n=t[r]={exports:{}};var a=true;try{e[r](n,n.exports,__nccwpck_require__);a=false}finally{if(a)delete t[r]}return n.exports}if(typeof __nccwpck_require__!=="undefined")__nccwpck_require__.ab=__dirname+"/";var r=__nccwpck_require__(701);module.exports=r})();
|
|
@@ -1,15 +1,7 @@
|
|
|
1
1
|
import crypto from 'crypto'
|
|
2
|
-
|
|
3
2
|
import { urlAlphabet } from './url-alphabet/index.js'
|
|
4
|
-
|
|
5
|
-
// It is best to make fewer, larger requests to the crypto module to
|
|
6
|
-
// avoid system call overhead. So, random numbers are generated in a
|
|
7
|
-
// pool. The pool is a Buffer that is larger than the initial random
|
|
8
|
-
// request size by this multiplier. The pool is enlarged if subsequent
|
|
9
|
-
// requests exceed the maximum buffer size.
|
|
10
3
|
const POOL_SIZE_MULTIPLIER = 128
|
|
11
4
|
let pool, poolOffset
|
|
12
|
-
|
|
13
5
|
let fillPool = bytes => {
|
|
14
6
|
if (!pool || pool.length < bytes) {
|
|
15
7
|
pool = Buffer.allocUnsafe(bytes * POOL_SIZE_MULTIPLIER)
|
|
@@ -21,65 +13,33 @@ let fillPool = bytes => {
|
|
|
21
13
|
}
|
|
22
14
|
poolOffset += bytes
|
|
23
15
|
}
|
|
24
|
-
|
|
25
16
|
let random = bytes => {
|
|
26
|
-
// `|=` convert `bytes` to number to prevent `valueOf` abusing and pool pollution
|
|
27
17
|
fillPool((bytes |= 0))
|
|
28
18
|
return pool.subarray(poolOffset - bytes, poolOffset)
|
|
29
19
|
}
|
|
30
|
-
|
|
31
20
|
let customRandom = (alphabet, defaultSize, getRandom) => {
|
|
32
|
-
// First, a bitmask is necessary to generate the ID. The bitmask makes bytes
|
|
33
|
-
// values closer to the alphabet size. The bitmask calculates the closest
|
|
34
|
-
// `2^31 - 1` number, which exceeds the alphabet size.
|
|
35
|
-
// For example, the bitmask for the alphabet size 30 is 31 (00011111).
|
|
36
21
|
let mask = (2 << (31 - Math.clz32((alphabet.length - 1) | 1))) - 1
|
|
37
|
-
// Though, the bitmask solution is not perfect since the bytes exceeding
|
|
38
|
-
// the alphabet size are refused. Therefore, to reliably generate the ID,
|
|
39
|
-
// the random bytes redundancy has to be satisfied.
|
|
40
|
-
|
|
41
|
-
// Note: every hardware random generator call is performance expensive,
|
|
42
|
-
// because the system call for entropy collection takes a lot of time.
|
|
43
|
-
// So, to avoid additional system calls, extra bytes are requested in advance.
|
|
44
|
-
|
|
45
|
-
// Next, a step determines how many random bytes to generate.
|
|
46
|
-
// The number of random bytes gets decided upon the ID size, mask,
|
|
47
|
-
// alphabet size, and magic number 1.6 (using 1.6 peaks at performance
|
|
48
|
-
// according to benchmarks).
|
|
49
22
|
let step = Math.ceil((1.6 * mask * defaultSize) / alphabet.length)
|
|
50
|
-
|
|
51
23
|
return (size = defaultSize) => {
|
|
52
24
|
let id = ''
|
|
53
25
|
while (true) {
|
|
54
26
|
let bytes = getRandom(step)
|
|
55
|
-
// A compact alternative for `for (let i = 0; i < step; i++)`.
|
|
56
27
|
let i = step
|
|
57
28
|
while (i--) {
|
|
58
|
-
// Adding `|| ''` refuses a random byte that exceeds the alphabet size.
|
|
59
29
|
id += alphabet[bytes[i] & mask] || ''
|
|
60
30
|
if (id.length === size) return id
|
|
61
31
|
}
|
|
62
32
|
}
|
|
63
33
|
}
|
|
64
34
|
}
|
|
65
|
-
|
|
66
35
|
let customAlphabet = (alphabet, size = 21) =>
|
|
67
36
|
customRandom(alphabet, size, random)
|
|
68
|
-
|
|
69
37
|
let nanoid = (size = 21) => {
|
|
70
|
-
// `|=` convert `size` to number to prevent `valueOf` abusing and pool pollution
|
|
71
38
|
fillPool((size |= 0))
|
|
72
39
|
let id = ''
|
|
73
|
-
// We are reading directly from the random pool to avoid creating new array
|
|
74
40
|
for (let i = poolOffset - size; i < poolOffset; i++) {
|
|
75
|
-
// It is incorrect to use bytes exceeding the alphabet size.
|
|
76
|
-
// The following mask reduces the random byte in the 0-255 value
|
|
77
|
-
// range to the 0-63 value range. Therefore, adding hacks, such
|
|
78
|
-
// as empty string fallback or magic numbers, is unneccessary because
|
|
79
|
-
// the bitmask trims bytes down to the alphabet size.
|
|
80
41
|
id += urlAlphabet[pool[i] & 63]
|
|
81
42
|
}
|
|
82
43
|
return id
|
|
83
44
|
}
|
|
84
|
-
|
|
85
45
|
export { nanoid, customAlphabet, customRandom, urlAlphabet, random }
|
|
@@ -1,34 +1,21 @@
|
|
|
1
|
-
// This alphabet uses `A-Za-z0-9_-` symbols.
|
|
2
|
-
// The order of characters is optimized for better gzip and brotli compression.
|
|
3
|
-
// References to the same file (works both for gzip and brotli):
|
|
4
|
-
// `'use`, `andom`, and `rict'`
|
|
5
|
-
// References to the brotli default dictionary:
|
|
6
|
-
// `-26T`, `1983`, `40px`, `75px`, `bush`, `jack`, `mind`, `very`, and `wolf`
|
|
7
1
|
let urlAlphabet =
|
|
8
2
|
'useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict'
|
|
9
|
-
|
|
10
3
|
let customAlphabet = (alphabet, defaultSize = 21) => {
|
|
11
4
|
return (size = defaultSize) => {
|
|
12
5
|
let id = ''
|
|
13
|
-
// A compact alternative for `for (var i = 0; i < step; i++)`.
|
|
14
6
|
let i = size | 0
|
|
15
7
|
while (i--) {
|
|
16
|
-
// `| 0` is more compact and faster than `Math.floor()`.
|
|
17
8
|
id += alphabet[(Math.random() * alphabet.length) | 0]
|
|
18
9
|
}
|
|
19
10
|
return id
|
|
20
11
|
}
|
|
21
12
|
}
|
|
22
|
-
|
|
23
13
|
let nanoid = (size = 21) => {
|
|
24
14
|
let id = ''
|
|
25
|
-
// A compact alternative for `for (var i = 0; i < step; i++)`.
|
|
26
15
|
let i = size | 0
|
|
27
16
|
while (i--) {
|
|
28
|
-
// `| 0` is more compact and faster than `Math.floor()`.
|
|
29
17
|
id += urlAlphabet[(Math.random() * 64) | 0]
|
|
30
18
|
}
|
|
31
19
|
return id
|
|
32
20
|
}
|
|
33
|
-
|
|
34
21
|
export { nanoid, customAlphabet }
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"name":"nanoid","version":"3.3.
|
|
1
|
+
{"name":"nanoid","version":"3.3.11","description":"A tiny (116 bytes), secure URL-friendly unique string ID generator","keywords":["uuid","random","id","url"],"engines":{"node":"^10 || ^12 || ^13.7 || ^14 || >=15.0.1"},"funding":[{"type":"github","url":"https://github.com/sponsors/ai"}],"author":"Andrey Sitnik <andrey@sitnik.ru>","license":"MIT","repository":"ai/nanoid","browser":{"./index.js":"./index.browser.js","./async/index.js":"./async/index.browser.js","./async/index.cjs":"./async/index.browser.cjs","./index.cjs":"./index.browser.cjs"},"react-native":"index.js","bin":"./bin/nanoid.cjs","sideEffects":false,"types":"./index.d.ts","type":"module","main":"index.cjs","module":"index.js","exports":{".":{"react-native":"./index.browser.js","browser":"./index.browser.js","require":{"types":"./index.d.cts","default":"./index.cjs"},"import":{"types":"./index.d.ts","default":"./index.js"},"default":"./index.js"},"./package.json":"./package.json","./async/package.json":"./async/package.json","./async":{"browser":"./async/index.browser.js","require":{"types":"./index.d.cts","default":"./async/index.cjs"},"import":{"types":"./index.d.ts","default":"./async/index.js"},"default":"./async/index.js"},"./non-secure/package.json":"./non-secure/package.json","./non-secure":{"require":{"types":"./index.d.cts","default":"./non-secure/index.cjs"},"import":{"types":"./index.d.ts","default":"./non-secure/index.js"},"default":"./non-secure/index.js"},"./url-alphabet/package.json":"./url-alphabet/package.json","./url-alphabet":{"require":{"types":"./index.d.cts","default":"./url-alphabet/index.cjs"},"import":{"types":"./index.d.ts","default":"./url-alphabet/index.js"},"default":"./url-alphabet/index.js"}},"_lastModified":"2025-07-29T06:17:52.669Z"}
|
|
@@ -1,7 +1,3 @@
|
|
|
1
|
-
// This alphabet uses `A-Za-z0-9_-` symbols.
|
|
2
|
-
// The order of characters is optimized for better gzip and brotli compression.
|
|
3
|
-
// Same as in non-secure/index.js
|
|
4
1
|
let urlAlphabet =
|
|
5
2
|
'useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict'
|
|
6
|
-
|
|
7
3
|
export { urlAlphabet }
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"name":"openid-client","version":"5.7.1","description":"OpenID Connect Relying Party (RP, Client) implementation for Node.js runtime, supports passportjs","keywords":["auth","authentication","basic","certified","client","connect","dynamic","electron","hybrid","identity","implicit","oauth","oauth2","oidc","openid","passport","relying party","strategy"],"homepage":"https://github.com/panva/openid-client","repository":"panva/openid-client","funding":{"url":"https://github.com/sponsors/panva"},"license":"MIT","author":"Filip Skokan <panva.ip@gmail.com>","exports":{"types":"./types/index.d.ts","import":"./lib/index.mjs","require":"./lib/index.js"},"main":"./lib/index.js","types":"./types/index.d.ts","files":["lib","types/index.d.ts"],"scripts":{"format":"npx prettier --loglevel silent --write ./lib ./test ./certification ./types","test":"mocha test/**/*.test.js"},"dependencies":{"jose":"^4.15.9","lru-cache":"^6.0.0","object-hash":"^2.2.0","oidc-token-hash":"^5.0.3"},"devDependencies":{"@types/node":"^16.18.106","@types/passport":"^1.0.16","base64url":"^3.0.1","chai":"^4.5.0","mocha":"^10.7.3","nock":"^13.5.5","prettier":"^2.8.8","readable-mock-req":"^0.2.2","sinon":"^9.2.4","timekeeper":"^2.3.1"},"standard-version":{"scripts":{"postchangelog":"sed -i '' -e 's/### \\[/## [/g' CHANGELOG.md"},"types":[{"type":"feat","section":"Features"},{"type":"fix","section":"Fixes"},{"type":"chore","hidden":true},{"type":"docs","hidden":true},{"type":"style","hidden":true},{"type":"refactor","section":"Refactor","hidden":false},{"type":"perf","section":"Performance","hidden":false},{"type":"test","hidden":true}]},"_lastModified":"2025-07-
|
|
1
|
+
{"name":"openid-client","version":"5.7.1","description":"OpenID Connect Relying Party (RP, Client) implementation for Node.js runtime, supports passportjs","keywords":["auth","authentication","basic","certified","client","connect","dynamic","electron","hybrid","identity","implicit","oauth","oauth2","oidc","openid","passport","relying party","strategy"],"homepage":"https://github.com/panva/openid-client","repository":"panva/openid-client","funding":{"url":"https://github.com/sponsors/panva"},"license":"MIT","author":"Filip Skokan <panva.ip@gmail.com>","exports":{"types":"./types/index.d.ts","import":"./lib/index.mjs","require":"./lib/index.js"},"main":"./lib/index.js","types":"./types/index.d.ts","files":["lib","types/index.d.ts"],"scripts":{"format":"npx prettier --loglevel silent --write ./lib ./test ./certification ./types","test":"mocha test/**/*.test.js"},"dependencies":{"jose":"^4.15.9","lru-cache":"^6.0.0","object-hash":"^2.2.0","oidc-token-hash":"^5.0.3"},"devDependencies":{"@types/node":"^16.18.106","@types/passport":"^1.0.16","base64url":"^3.0.1","chai":"^4.5.0","mocha":"^10.7.3","nock":"^13.5.5","prettier":"^2.8.8","readable-mock-req":"^0.2.2","sinon":"^9.2.4","timekeeper":"^2.3.1"},"standard-version":{"scripts":{"postchangelog":"sed -i '' -e 's/### \\[/## [/g' CHANGELOG.md"},"types":[{"type":"feat","section":"Features"},{"type":"fix","section":"Fixes"},{"type":"chore","hidden":true},{"type":"docs","hidden":true},{"type":"style","hidden":true},{"type":"refactor","section":"Refactor","hidden":false},{"type":"perf","section":"Performance","hidden":false},{"type":"test","hidden":true}]},"_lastModified":"2025-07-29T06:17:52.583Z"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { Context, Next } from '@
|
|
1
|
+
import { Context, Next } from '@tego/server';
|
|
2
2
|
export declare const getAuthUrl: (ctx: Context, next: Next) => Promise<any>;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { Context, Next } from '@
|
|
1
|
+
import { Context, Next } from '@tego/server';
|
|
2
2
|
export declare const redirect: (ctx: Context, next: Next) => Promise<void>;
|
|
@@ -20,7 +20,7 @@ __export(redirect_exports, {
|
|
|
20
20
|
redirect: () => redirect
|
|
21
21
|
});
|
|
22
22
|
module.exports = __toCommonJS(redirect_exports);
|
|
23
|
-
var import_server = require("@
|
|
23
|
+
var import_server = require("@tego/server");
|
|
24
24
|
const redirect = async (ctx, next) => {
|
|
25
25
|
const {
|
|
26
26
|
params: { state }
|
|
@@ -20,7 +20,7 @@ __export(update_autosignup_exports, {
|
|
|
20
20
|
default: () => UpdateAutoSignupMigration
|
|
21
21
|
});
|
|
22
22
|
module.exports = __toCommonJS(update_autosignup_exports);
|
|
23
|
-
var import_server = require("@
|
|
23
|
+
var import_server = require("@tego/server");
|
|
24
24
|
var import_constants = require("../../constants");
|
|
25
25
|
class UpdateAutoSignupMigration extends import_server.Migration {
|
|
26
26
|
constructor() {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { AuthConfig, BaseAuth } from '@
|
|
2
|
-
export { Model } from '@
|
|
1
|
+
import { AuthConfig, BaseAuth } from '@tego/server';
|
|
2
|
+
export { Model } from '@tego/server';
|
|
3
3
|
export declare class OIDCAuth extends BaseAuth {
|
|
4
4
|
constructor(config: AuthConfig);
|
|
5
5
|
getRedirectUri(): string;
|
|
@@ -11,5 +11,5 @@ export declare class OIDCAuth extends BaseAuth {
|
|
|
11
11
|
[source: string]: any;
|
|
12
12
|
};
|
|
13
13
|
createOIDCClient(): Promise<import("openid-client").BaseClient>;
|
|
14
|
-
validate(): Promise<import("@
|
|
14
|
+
validate(): Promise<import("@tego/server").Model<any, any>>;
|
|
15
15
|
}
|
package/dist/server/oidc-auth.js
CHANGED
|
@@ -17,15 +17,15 @@ var __copyProps = (to, from, except, desc) => {
|
|
|
17
17
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
18
18
|
var oidc_auth_exports = {};
|
|
19
19
|
__export(oidc_auth_exports, {
|
|
20
|
-
Model: () =>
|
|
20
|
+
Model: () => import_server2.Model,
|
|
21
21
|
OIDCAuth: () => OIDCAuth
|
|
22
22
|
});
|
|
23
23
|
module.exports = __toCommonJS(oidc_auth_exports);
|
|
24
|
-
var
|
|
24
|
+
var import_server = require("@tego/server");
|
|
25
25
|
var import_openid_client = require("openid-client");
|
|
26
26
|
var import_constants = require("../constants");
|
|
27
|
-
var
|
|
28
|
-
class OIDCAuth extends
|
|
27
|
+
var import_server2 = require("@tego/server");
|
|
28
|
+
class OIDCAuth extends import_server.BaseAuth {
|
|
29
29
|
constructor(config) {
|
|
30
30
|
const { ctx } = config;
|
|
31
31
|
super({
|
package/dist/server/plugin.d.ts
CHANGED
package/dist/server/plugin.js
CHANGED
|
@@ -21,8 +21,8 @@ __export(plugin_exports, {
|
|
|
21
21
|
default: () => plugin_default
|
|
22
22
|
});
|
|
23
23
|
module.exports = __toCommonJS(plugin_exports);
|
|
24
|
-
var
|
|
25
|
-
var import_server = require("@
|
|
24
|
+
var import_node_path = require("node:path");
|
|
25
|
+
var import_server = require("@tego/server");
|
|
26
26
|
var import_constants = require("../constants");
|
|
27
27
|
var import_getAuthUrl = require("./actions/getAuthUrl");
|
|
28
28
|
var import_redirect = require("./actions/redirect");
|
|
@@ -35,7 +35,7 @@ class OidcPlugin extends import_server.Plugin {
|
|
|
35
35
|
async load() {
|
|
36
36
|
this.db.addMigrations({
|
|
37
37
|
namespace: "auth",
|
|
38
|
-
directory: (0,
|
|
38
|
+
directory: (0, import_node_path.resolve)(__dirname, "migrations"),
|
|
39
39
|
context: {
|
|
40
40
|
plugin: this
|
|
41
41
|
}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tachybase/plugin-auth-oidc",
|
|
3
3
|
"displayName": "Auth: OIDC",
|
|
4
|
-
"version": "1.3.
|
|
4
|
+
"version": "1.3.22",
|
|
5
5
|
"description": "OIDC (OpenID Connect) authentication.",
|
|
6
6
|
"keywords": [
|
|
7
7
|
"Authentication"
|
|
@@ -10,29 +10,22 @@
|
|
|
10
10
|
"main": "./dist/server/index.js",
|
|
11
11
|
"dependencies": {},
|
|
12
12
|
"devDependencies": {
|
|
13
|
-
"@ant-design/icons": "
|
|
13
|
+
"@ant-design/icons": "^5.6.1",
|
|
14
|
+
"@tachybase/schema": "^1.3.39",
|
|
15
|
+
"@tachybase/test": "^1.3.39",
|
|
16
|
+
"@tego/client": "^1.3.39",
|
|
17
|
+
"@tego/server": "^1.3.39",
|
|
14
18
|
"ahooks": "^3.9.0",
|
|
15
19
|
"antd": "5.22.5",
|
|
16
|
-
"nanoid": "3.3.8",
|
|
20
|
+
"nanoid": "^3.3.8",
|
|
17
21
|
"openid-client": "^5.7.1",
|
|
18
|
-
"react": "
|
|
19
|
-
"react-i18next": "
|
|
22
|
+
"react": "18.3.1",
|
|
23
|
+
"react-i18next": "15.2.0",
|
|
20
24
|
"react-router-dom": "6.28.1",
|
|
21
|
-
"@tachybase/
|
|
22
|
-
"@tachybase/
|
|
23
|
-
},
|
|
24
|
-
"peerDependencies": {
|
|
25
|
-
"@tachybase/auth": "1.3.20",
|
|
26
|
-
"@tachybase/actions": "1.3.20",
|
|
27
|
-
"@tachybase/client": "1.3.20",
|
|
28
|
-
"@tachybase/database": "1.3.20",
|
|
29
|
-
"@tachybase/server": "1.3.20",
|
|
30
|
-
"@tachybase/module-auth": "1.3.20",
|
|
31
|
-
"@tachybase/test": "1.3.20"
|
|
25
|
+
"@tachybase/client": "1.3.22",
|
|
26
|
+
"@tachybase/module-auth": "1.3.22"
|
|
32
27
|
},
|
|
33
28
|
"description.zh-CN": "通过 OIDC (OpenID Connect) 协议认证身份。",
|
|
34
29
|
"displayName.zh-CN": "认证:OIDC",
|
|
35
|
-
"scripts": {
|
|
36
|
-
"build": "tachybase-build --no-dts @tachybase/plugin-auth-oidc"
|
|
37
|
-
}
|
|
30
|
+
"scripts": {}
|
|
38
31
|
}
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"image": "localhost/ai-opensource:latest",
|
|
3
|
-
"forwardPorts": [],
|
|
4
|
-
"mounts": [
|
|
5
|
-
{
|
|
6
|
-
"source": "pnpm-store",
|
|
7
|
-
"target": "/home/ai/.local/share/pnpm/store",
|
|
8
|
-
"type": "volume"
|
|
9
|
-
},
|
|
10
|
-
{
|
|
11
|
-
"source": "shell-history",
|
|
12
|
-
"target": "/home/ai/.local/share/history/",
|
|
13
|
-
"type": "volume"
|
|
14
|
-
}
|
|
15
|
-
],
|
|
16
|
-
"workspaceMount": "",
|
|
17
|
-
"runArgs": [
|
|
18
|
-
"--userns=keep-id:uid=1000,gid=1000",
|
|
19
|
-
"--volume=${localWorkspaceFolder}:/workspaces/${localWorkspaceFolderBasename}:Z",
|
|
20
|
-
"--network=host",
|
|
21
|
-
"--ulimit=host"
|
|
22
|
-
]
|
|
23
|
-
}
|