* 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>
20 lines
503 B
TypeScript
20 lines
503 B
TypeScript
import { Plugin } from '@nocobase/client';
|
|
import AuthPlugin from '@nocobase/plugin-auth/client';
|
|
import { SigninPage } from './SigninPage';
|
|
import { Options } from './Options';
|
|
import { authType } from '../constants';
|
|
|
|
export class SmsAuthPlugin extends Plugin {
|
|
async load() {
|
|
const auth = this.app.pm.get(AuthPlugin);
|
|
auth.registerType(authType, {
|
|
components: {
|
|
SignInForm: SigninPage,
|
|
AdminSettingsForm: Options,
|
|
},
|
|
});
|
|
}
|
|
}
|
|
|
|
export default SmsAuthPlugin;
|