Skip to main content

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.

  1. Use the following instances as input parameters

  2. After entering user information, click the confirm button to validate the input

  3. Return the obtained information

    1. For registration and login, return the input content of the input fields
    2. 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

PropertyDescriptionType
Default
Version
defaultChainIdDefault chain IDChainIdAELF
classNameClass name of the top level containerstring-
styleStyleCSSProperties
isErrorTipIs the error prompt set defaultbooleantrue
isShowScanIs scan code to log in shownbooleantrue
termsOfServiceAddress of the terms, won't be displayed if not configuredReactNode-
phoneCountryList of countries that support sending SMS verification codesIPhoneCountry-2.0.0
extraElementCustomized contentReactNode-
onErrorCallback of error(error: {errorFields:string, error: any}) => void;-
validateEmailCustomized rules for email verification(v:string)=>Promise<any>-
validatePhoneCustomized rules for phone number verification(v:string)=>Promise<any>-2.0.0
onSuccessCallback when data is entered and successfully verified(value: IGuardianIdentifierInfo) => void;-
onSuccessCallback when data is entered and successfully verified(value: SignInSuccess) => void;-
onLoginFinishWithoutPinCallback when login is completed yet PIN is not entered, triggered when scanning the code or when Portkey App is activatedLoginFinishWithoutPin-
onChainIdChangeTriggered when the chain where the user registers address does not match the default chain ID(chainId?: ChainId) => void;-

SocialDesignProps

PropertyDescriptionType
Default
Version
typeDefault class for user login"Email" | "Telegram" | "Google" | "Apple" | "Scan" | nullnullV2.0.0

CryptoDesignProps

PropertyDescriptionType
Default
Version
typeDefault class for user login"SignUp" | "Login" | "LoginByScan""Login"
onSignTypeChangeCallback triggered when user operation changes(type: CreateWalletType) => void;-

Web2DesignProps

PropertyDescriptionType
Default
Version
typeDefault class for user login"SignUp" | "Login" | "LoginByScan""Login"
sizeDefault size"L" | "S"-
onSignTypeChangeCallback triggered when user operation changes(type: CreateWalletType) => void;-