* 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
		
	
	
		
			499 B
		
	
	
	
		
			TypeScript
		
	
	
	
	
	
			
		
		
	
	
			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;
 |