SignUpAndLogin
Login panel: Includes login, QR code login, and registration functions, can invoke UI corresponding registration and login interfaces.
Registration page corresponds to --> SDK.signup, login page --> SDK.socialRecovery, QR code --> QR code that provides data.
Use the following instances as input parameters
After entering user information, click the confirm button to validate the input
Return the obtained information
- For registration and login, return the input content of the input fields
- For successful QR code login, return the DID wallet information
Usage
<SignUpAndLogin
termsOfServiceUrl={'your terms of servicer url'}
onError={(error: any) => {
console.log(error, 'onError');
}}
onSuccess={(value: any) => {
console.log(value, 'onSuccess');
}}
/>
API
BaseProps
Property | Description | Type | Default | Version |
---|---|---|---|---|
defaultChainId | Default chain ID | ChainId | AELF | |
className | Class name of the top level container | string | - | |
style | Style | CSSProperties | ||
isErrorTip | Is the error prompt set default | boolean | true | |
isShowScan | Is scan code to log in shown | boolean | true | |
termsOfService | Address of the terms, won't be displayed if not configured | ReactNode | - | |
- | 2.0.0 | |||
extraElement | Customized content | ReactNode | - | |
onError | Callback of error | (error: {errorFields:string, error: any}) => void; | - | |
validateEmail | Customized rules for email verification | (v:string)=>Promise<any> | - | |
- | 2.0.0 | |||
onSuccess | Callback when data is entered and successfully verified | (value: IGuardianIdentifierInfo) => void; | - | |
onSuccess | Callback when data is entered and successfully verified | (value: SignInSuccess) => void; | - | |
onLoginFinishWithoutPin | Callback when login is completed yet PIN is not entered, triggered when scanning the code or when Portkey App is activated | LoginFinishWithoutPin | - | |
onChainIdChange | Triggered when the chain where the user registers address does not match the default chain ID | (chainId?: ChainId) => void; | - |
SocialDesignProps
Property | Description | Type | Default | Version |
---|---|---|---|---|
type | Default class for user login | "Email" | "Telegram" | "Google" | "Apple" | "Scan" | null | null | V2.0.0 |
CryptoDesignProps
Property | Description | Type | Default | Version |
---|---|---|---|---|
type | Default class for user login | "SignUp" | "Login" | "LoginByScan" | "Login" | |
onSignTypeChange | Callback triggered when user operation changes | (type: CreateWalletType) => void; | - |
Web2DesignProps
Property | Description | Type | Default | Version |
---|---|---|---|---|
type | Default class for user login | "SignUp" | "Login" | "LoginByScan" | "Login" | |
size | Default size | "L" | "S" | - | |
onSignTypeChange | Callback triggered when user operation changes | (type: CreateWalletType) => void; | - |