tachybase_todo/packages/plugins/oidc/src/client/index.tsx
anuoua 1ac0032e5c
feat: oidc (#1126)
* feat: oidc

* feat: oidc remove comments

* feat: oidc add shared type

* feat: oidc add id_token sign alg

* feat: oidc i18n & batch delete

* feat: oidc i18n

* feat: oidc import fix

* feat: oidc saml list fix

* feat: oidc i18n move to plugin

* feat: oidc cr fix

* feat: oidc cr fix

* feat: oidc cr fix

* feat: oidc fix nonce value

* feat: oidc page extension fix

* feat: oidc remove canceltoken

Co-authored-by: chenos <chenlinxh@gmail.com>
2022-11-29 23:18:21 +08:00

39 lines
1.1 KiB
TypeScript

import { PluginManagerContext, SettingsCenterProvider, SigninPageExtensionProvider } from '@nocobase/client';
import React, { useContext } from 'react';
import { useOidcTranslation } from './locale';
import { OIDCList } from './OIDCList';
import { OIDCPanel } from './OIDCPanel';
export default function (props) {
const { t } = useOidcTranslation();
const ctx = useContext(PluginManagerContext);
return (
<SigninPageExtensionProvider component={OIDCList}>
<SettingsCenterProvider
settings={{
'oidc-manager': {
title: t('OIDC manager'),
icon: 'FileOutlined',
tabs: {
storages: {
title: t('OIDC Providers'),
component: OIDCPanel,
},
},
},
}}
>
<PluginManagerContext.Provider
value={{
components: {
...ctx?.components,
},
}}
>
{props.children}
</PluginManagerContext.Provider>
</SettingsCenterProvider>
</SigninPageExtensionProvider>
);
}