tachybase_todo/packages/plugins/@nocobase/plugin-saml/src/client/index.tsx
YANG QIA 06f11a2d08
refactor(auth): move auth client from core to the plugin & refactor auth client api (#3215)
* refactor(auth): auth client api

* fix: build

* fix: dependencies

* fix: fix T-2777

* fix: fix T-2776

* chore: update type

* fix: build

* fix: allowSignUp

* fix: file name

* fix: file name

* refactor: client api

* fix: build

* chore: update name

* fix: tsx must be loaded with --import instead of --loader

* fix: type

* fix: type

* fix: type

* fix: type

* fix: bug

* chore: improve wording

* fix: test

---------

Co-authored-by: chenos <chenlinxh@gmail.com>
2023-12-21 20:19:25 +08:00

20 lines
499 B
TypeScript

import { Plugin } from '@nocobase/client';
import AuthPlugin from '@nocobase/plugin-auth/client';
import { authType } from '../constants';
import { SAMLButton } from './SAMLButton';
import { Options } from './Options';
export class SamlPlugin extends Plugin {
async load() {
const auth = this.app.pm.get(AuthPlugin);
auth.registerType(authType, {
components: {
SignInButton: SAMLButton,
AdminSettingsForm: Options,
},
});
}
}
export default SamlPlugin;