Auth is an abstract class for user authentication types. It defines the interfaces required to complete user authentication. To extend a new user authentication type, you need to inherit the Auth class and implement its methods. For a basic implementation, refer to: BaseAuth.
userAuthenticated user information.
abstract user: Modelconstructor()Constructor, creates an Auth instance.
constructor(config: AuthConfig)| Property | Type | Description |
|---|---|---|
authenticator | Authenticator | Authenticator data model. The actual type in a NocoBase application is AuthModel. |
options | Record<string, any> | Authenticator-related configuration. |
ctx | Context | Request context. |
check()User authentication. Returns user information. This is an abstract method that all authentication types must implement.
abstract check(): Promise<Model>signIn()User sign in.
signIn(): Promise<any>signUp()User sign up.
signUp(): Promise<any>signOut()User sign out.
signOut(): Promise<any>