Authentication Login
发布于:2024-11-21
Updated Records
Comment
Update Time | Updated Content | SDK Version | Content Search |
2022-11-17 | Login Asynchronous Callback Interface | V1.0.3 | |
2022-09-29 | Login Authentication Module | V1.0.0 |
1. Login in Blueprin
1.1 Blueprint Login Logic Explanation
The first time a user logs in, they enter their account and password through the Blueprint interface.
Successful login will encrypt the account and save it for automatic login at the next program startup.
Failed login will return the reason for the login error.
Automatic Login:
Each time you start the program, it automatically triggers login verification if it detects account information saved on the local computer.
Log out and unbind:
Provides a Blueprint method to log out of the currently logged in account.
After logging out the account is unbound from the current machine and can be used to log in on other machines.
1.2 Blueprint Method
1.Login
Style3D Account Login: Used to enter the account password and return the result after login.
Username
Password
Force Sign in: Can be forced to log in on the current machine, previously logged in machine will go offline
LoginFinished: Callback event at the end of the login. The return values are as follows:
Success: Login Successful or Not
ErrorType: Returns the corresponding error code when login fails.
ErrorMessage: Returns the corresponding error reason when login fails.
Is Style3D Login: Used to check if the current account has been successfully logged in.
2. Login Asynchronous Callback Interface
Application Scenarios
After packaged into an app, the system will actively and automatically log in every time the app is restarted. This eliminates the need to pop up a login window each time and ask the user to enter the account password.
You can listen to the success of auto login by using the Style3D Bind Auto Login Event callback event.
Successful login will take you directly to the app experience
If the login fails, then connect to the manual login process, which is the Style3D Account Login node above
3.Log Out
Style3D Account Logout: Use to log out and unbind your account.
LogoutFinished: Exit the callback event at the end of the login. The return values are as follows:
Success: Logout Successful or Not
Message:The message returned by logging out.
2. Log View
The same way to view login-related logs in the editor and in the blueprint is to filter the LogStyle3DNetwork field in the log as follows:
LogStyle3DNetwork: syncPost-url = https://api.style3d.com/account/auth/login
LogStyle3DNetwork: Login Success!
LogStyle3DNetwork: clientId:= D7525BC3-B38B-D15F-9938-5811229D466E-DESKTOP-4DIUC8B-
LogStyle3DNetwork: syncPost-postData: key = client_id value = D7525BC3-B38B-D15F-9938-5811229D466E-DESKTOP-4DIUC8B-
LogStyle3DNetwork: syncPost-postData: key = code value =
LogStyle3DNetwork: syncPost-postData: key = version value = 4.8.405
LogStyle3DNetwork: syncPost-postData: key = category value = style3dClient
LogStyle3DNetwork: syncPost-postData: key = environment value = windows
LogStyle3DNetwork: syncPost-url = https://api.style3d.com/setting/software/user_init_info
LogStyle3DNetwork: GetUserInfo call back:= {"state":true,"message":"","data":{"user_info":{"id":47649,"name":"pangqibo","introduction":"庞启波","tel":"","email":"pangqibo@linctex.com","avatar":{"id":"","name":"","path":"","version":""},"roles":["product_supplier","product_buyer","fabric_supplier","fabric_buyer","accessory_supplier","accessory_buyer"],"created_a
LogStyle3DNetwork: Get user info success!
3. Error Code Comparison
to be added
4. Third Party Account associated with Style3D Account
The user in the main program of the client does not use the style3D account directly, but by using the account of the main program, it realizes to call the Style3D account for authentication login operation.
Contact linctex staff to open Style3D accounts in bulk.