@authing/guard-shim-react18 5.0.8-alpha.2 → 5.0.8-alpha.3
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/esm/guard.min.css +2 -0
- package/dist/esm/guard.min.js +2 -0
- package/dist/esm/guard.min.js.LICENSE.txt +29 -0
- package/dist/typings/index.d.ts +45 -0
- package/dist/typings/types.d.ts +47 -0
- package/package.json +15 -8
- package/src/index.tsx +0 -515
- package/src/types.ts +0 -93
- package/tsconfig.json +0 -31
package/src/types.ts
DELETED
|
@@ -1,93 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
GuardEventsKebabToCamelType,
|
|
3
|
-
Lang,
|
|
4
|
-
GuardProps,
|
|
5
|
-
GuardLocalConfig,
|
|
6
|
-
CodeAction,
|
|
7
|
-
ApiCode,
|
|
8
|
-
GuardModuleType,
|
|
9
|
-
LoginMethods,
|
|
10
|
-
OIDCConnectionMode,
|
|
11
|
-
SocialConnectionProvider,
|
|
12
|
-
Protocol,
|
|
13
|
-
RegisterMethods,
|
|
14
|
-
GuardMode,
|
|
15
|
-
InputMethod,
|
|
16
|
-
GuardPageSene,
|
|
17
|
-
EmailScene,
|
|
18
|
-
SceneType
|
|
19
|
-
} from '@authing/react18-components'
|
|
20
|
-
|
|
21
|
-
export type ICodeAction = `${CodeAction}`
|
|
22
|
-
export type IApiCode = `${ApiCode}`
|
|
23
|
-
export type IGuardModuleType = `${GuardModuleType}`
|
|
24
|
-
export type ILoginMethod = `${LoginMethods}`
|
|
25
|
-
export type IOIDCConnectionMode = `${OIDCConnectionMode}`
|
|
26
|
-
export type ISocialConnectionProvider = `${SocialConnectionProvider}`
|
|
27
|
-
export type IProtocol = `${Protocol}`
|
|
28
|
-
export type IRegisterMethod = `${RegisterMethods}`
|
|
29
|
-
export type IGuardMode = `${GuardMode}`
|
|
30
|
-
export type IInputMethod = `${InputMethod}`
|
|
31
|
-
export type IGuardPageSene = `${GuardPageSene}`
|
|
32
|
-
export type IEmailScene = `${EmailScene}`
|
|
33
|
-
export type ISceneType = `${SceneType}`
|
|
34
|
-
|
|
35
|
-
export type GuardEventListeners = {
|
|
36
|
-
[key in keyof GuardEventsKebabToCamelType]: Exclude<
|
|
37
|
-
Required<GuardEventsKebabToCamelType>[key],
|
|
38
|
-
undefined
|
|
39
|
-
>[]
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
export type CodeChallengeMethod = 'S256' | 'plain'
|
|
43
|
-
|
|
44
|
-
export interface IGuardConfig extends GuardLocalConfig {
|
|
45
|
-
// replace socialConnections
|
|
46
|
-
socialConnectionList?: ISocialConnectionProvider[]
|
|
47
|
-
|
|
48
|
-
// replace defaultLoginMethod
|
|
49
|
-
loginMethod?: ILoginMethod
|
|
50
|
-
|
|
51
|
-
// replace loginMethods
|
|
52
|
-
loginMethodList: ILoginMethod[]
|
|
53
|
-
|
|
54
|
-
// replace defaultRegisterMethod
|
|
55
|
-
registerMethod?: IRegisterMethod
|
|
56
|
-
|
|
57
|
-
// replace registerMethods
|
|
58
|
-
registerMethodList?: IRegisterMethod[]
|
|
59
|
-
|
|
60
|
-
// replace contentCss
|
|
61
|
-
contentCSS?: string
|
|
62
|
-
}
|
|
63
|
-
|
|
64
|
-
export interface GuardOptions extends GuardProps {
|
|
65
|
-
appId: string
|
|
66
|
-
host?: string
|
|
67
|
-
redirectUri?: string
|
|
68
|
-
mode?: IGuardMode
|
|
69
|
-
defaultScene?: IGuardModuleType
|
|
70
|
-
tenantId?: string
|
|
71
|
-
lang?: Lang
|
|
72
|
-
isSSO?: boolean
|
|
73
|
-
config?: Partial<IGuardConfig> // 兼容 4.x 的 config
|
|
74
|
-
}
|
|
75
|
-
|
|
76
|
-
export interface StartWithRedirectOptions {
|
|
77
|
-
codeChallengeMethod?: CodeChallengeMethod
|
|
78
|
-
scope?: string
|
|
79
|
-
redirectUri?: string
|
|
80
|
-
state?: string
|
|
81
|
-
responseType?:
|
|
82
|
-
| 'code'
|
|
83
|
-
| 'code id_token token'
|
|
84
|
-
| 'code id_token'
|
|
85
|
-
| 'code token'
|
|
86
|
-
| 'id_token token'
|
|
87
|
-
| 'id_token'
|
|
88
|
-
| 'none'
|
|
89
|
-
responseMode?: 'query' | 'fragment' | 'form_post'
|
|
90
|
-
nonce?: string
|
|
91
|
-
}
|
|
92
|
-
|
|
93
|
-
export * from '@authing/react18-components'
|
package/tsconfig.json
DELETED
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"compilerOptions": {
|
|
3
|
-
"baseUrl": ".",
|
|
4
|
-
"outDir": "dist",
|
|
5
|
-
"target": "es5",
|
|
6
|
-
"lib": ["dom", "esnext"],
|
|
7
|
-
"allowJs": false,
|
|
8
|
-
"skipLibCheck": true,
|
|
9
|
-
"esModuleInterop": true,
|
|
10
|
-
"allowSyntheticDefaultImports": true,
|
|
11
|
-
"strict": true,
|
|
12
|
-
"forceConsistentCasingInFileNames": true,
|
|
13
|
-
"noFallthroughCasesInSwitch": true,
|
|
14
|
-
"module": "esnext",
|
|
15
|
-
"moduleResolution": "node",
|
|
16
|
-
"resolveJsonModule": true,
|
|
17
|
-
"declaration": true,
|
|
18
|
-
"declarationDir": "./dist/typings",
|
|
19
|
-
"noEmit": false,
|
|
20
|
-
"jsx": "react",
|
|
21
|
-
"downlevelIteration": true
|
|
22
|
-
},
|
|
23
|
-
"include": [
|
|
24
|
-
"src/**/*.tsx",
|
|
25
|
-
"src/**/*.ts"
|
|
26
|
-
],
|
|
27
|
-
"exclude": [
|
|
28
|
-
"node_modules",
|
|
29
|
-
"dist"
|
|
30
|
-
]
|
|
31
|
-
}
|