A method and terminal for two-way binding of an account
By obtaining user information from the second system through the first system and establishing a binding relationship, and using passwordless tokens to achieve two-way account binding, the limitation of one-way binding in the OAuth2.0 protocol is resolved, enabling two-way interoperability and resource sharing across systems.
Patent Information
- Application Number
- CN202410517641.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-04-28
- Publication Date
- 2025-12-05
- Estimated Expiration
- 2044-04-28
AI Technical Summary
In existing technologies, the OAuth2.0 protocol only provides a solution for one-way information requests for accounts and cannot achieve two-way binding across application systems.
The first program system obtains user information from the second program system, determines whether a matching account exists, and establishes a binding relationship. The second program system stores and returns a password-free token to the first program system, thus achieving two-way account binding.
It enables two-way binding of cross-system accounts, solving the problem of users having difficulty remembering passwords for multiple accounts, and realizing two-way interoperability of system accounts, facilitating resource and data sharing.
Smart Images

Figure CN118353687B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of account management technology, and in particular to a method and terminal for two-way account binding. Background Technology
[0002] In existing technologies, account authentication and binding are generally implemented using the OAuth 2.0 protocol. (See reference...) Figure 1 The certification process is briefly explained below:
[0003] 1. Obtain the authorization code;
[0004] 2. Obtain the access token;
[0005] 3. Obtain the OpenID using the access token;
[0006] 4. Obtain user authorization information by calling the API using the access token and OpenID.
[0007] The OAuth 2.0 protocol only provides a solution for one-way account information requests; for example, it can only grant authorization from system A to system B, but not from system B to system A. Therefore, how to achieve two-way binding of site IDs remains a technical problem that needs to be solved. Summary of the Invention
[0008] The technical problem to be solved by this invention is to provide a method and terminal for two-way account binding, so as to realize two-way account binding across program systems.
[0009] To solve the above-mentioned technical problems, the technical solution adopted by the present invention is as follows:
[0010] A method for two-way account binding includes the following steps:
[0011] S1. The first program system, based on the user's request for cross-system authorization login, redirects to the user authorization address of the second program system and obtains the user information of the second account in the second program system based on the authorization agreement;
[0012] S2. The first program system determines whether a matching first account exists based on the user information, establishes a binding relationship between the first account and the second account, and reports it to the second program system.
[0013] S3. The second program system stores the binding relationship and returns the associated passwordless token to the first program system for saving.
[0014] A method for cross-system access based on two-way account binding includes the following steps:
[0015] S1. After logging in, the first program system obtains the user's second account and second password information on the second program system based on the account binding operation initiated by the user, and actively initiates account binding with the second program system in order to obtain the password-free token returned by the second program system.
[0016] Alternatively, by following the steps in the above-described method for two-way account binding, a password-free token returned by the second program system can be obtained;
[0017] S2. The first program system logs in and accesses the second program system based on the passwordless token.
[0018] To solve the above-mentioned technical problems, another technical solution adopted by the present invention is as follows:
[0019] A terminal for two-way account binding includes a processor, a memory, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, it performs the following steps:
[0020] S1. The first program system, based on the user's request for cross-system authorization login, redirects to the user authorization address of the second program system and obtains the user information of the second account in the second program system based on the authorization agreement;
[0021] S2. The first program system determines whether a matching first account exists based on the user information, establishes a binding relationship between the first account and the second account, and reports it to the second program system.
[0022] S3. The second program system stores the binding relationship and returns the associated passwordless token to the first program system for saving.
[0023] A terminal for cross-system access based on two-way account binding includes a processor, a memory, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, it performs the following steps:
[0024] S1. After logging in, the first program system obtains the user's second account and second password information on the second program system based on the account binding operation initiated by the user, and actively initiates account binding with the second program system in order to obtain the password-free token returned by the second program system.
[0025] Alternatively, by following the steps in the above-described method for two-way account binding, a password-free token returned by the second program system can be obtained;
[0026] S2. The first program system logs in and accesses the second program system based on the passwordless token.
[0027] The beneficial effects of the present invention are as follows: The present invention provides a method and terminal for two-way account binding, which realizes two-way binding of cross-system accounts, thereby enabling login to two or more systems through an account in one system, realizing two-way interoperability of system accounts, facilitating resource and data sharing and interoperability, and solving the problem of users having difficulty remembering passwords for multiple accounts. Attached Figure Description
[0028] Figure 1 This is a schematic diagram of the authentication process of the OAuth2.0 protocol in the background art of this invention;
[0029] Figure 2 This is a flowchart illustrating a method for two-way account binding according to Embodiment 1 of the present invention;
[0030] Figure 3 This is a timing diagram of a method for two-way account binding according to Embodiment 1 of the present invention;
[0031] Figure 4 This is a partial flowchart illustrating a method for cross-system access based on two-way account binding according to Embodiment 2 of the present invention.
[0032] Figure 5 This is a schematic diagram of the verification process for cross-system login access in a method for cross-system access based on two-way account binding according to Embodiment 2 of the present invention.
[0033] Figure 6 This is a schematic diagram of another cross-system login access process for a method of cross-system access based on two-way account binding according to Embodiment 2 of the present invention;
[0034] Figure 7 This is a schematic diagram of the structure of a terminal for two-way account binding according to an embodiment of the present invention;
[0035] Figure 8 This is a schematic diagram of the structure of a terminal for cross-system access based on two-way account binding, according to an embodiment of the present invention. Detailed Implementation
[0036] To explain in detail the technical content, objectives, and effects of the present invention, the following description is provided in conjunction with the embodiments and accompanying drawings.
[0037] Please refer to Figure 2 as well as Figure 3 A method for two-way account binding includes the following steps:
[0038] S1. The first program system, based on the user's request for cross-system authorization login, redirects to the user authorization address of the second program system and obtains the user information of the second account in the second program system based on the authorization agreement;
[0039] S2. The first program system determines whether a matching first account exists based on the user information, establishes a binding relationship between the first account and the second account, and reports it to the second program system.
[0040] S3. The second program system stores the binding relationship and returns the associated passwordless token to the first program system for saving.
[0041] As can be seen from the above description, the beneficial effects of the present invention are as follows: The present invention provides a method for two-way account binding, which, when a user requests to log in using an account of another program system, obtains the user information of the user's account in the other system based on the authorization agreement, and retrieves the account corresponding to the current system based on the user information, thereby establishing a two-way binding relationship between the two accounts while ensuring security.
[0042] Furthermore, the user information includes data information that effectively identifies the user's true identity.
[0043] As described above, user information includes data that effectively identifies the user's real identity, ensuring that the bound accounts belong to the same user and guaranteeing the accuracy, validity, and security of account binding.
[0044] Please refer to Figure 4 as well as Figure 5 A method for cross-system access based on two-way account binding includes the following steps:
[0045] S1. After logging in, the first program system obtains the user's second account and second password information on the second program system based on the account binding operation initiated by the user, and actively initiates account binding with the second program system in order to obtain the password-free token returned by the second program system.
[0046] Alternatively, by following the steps in the above-described method for two-way account binding, a password-free token returned by the second program system can be obtained;
[0047] S2. The first program system logs in and accesses the second program system based on the passwordless token.
[0048] As can be seen from the above description, the beneficial effects of the present invention are as follows: The present invention provides a method for cross-system access based on two-way account binding, which realizes two-way binding of cross-system accounts, thereby enabling login to two or more systems through an account in one system, realizing two-way interoperability of system accounts, facilitating resource and data sharing and interoperability, and solving the problem of users having difficulty remembering passwords for multiple accounts.
[0049] Further, step S1 includes the following steps:
[0050] S11. After logging in, the first program system obtains the user's account and password information on the second program system based on the account binding operation initiated by the user.
[0051] S12. The first program system verifies the second account and the second password through the account binding page of the second program system, and receives the passwordless token and OpenId returned by the second program system.
[0052] S13. The first program system establishes a binding relationship between the passwordless token and OpenId and the user's first account logged in to the first program system, and reports the binding relationship to the second program system;
[0053] S14. The second program system stores the binding relationship.
[0054] As described above, account binding to different systems can be initiated by the user entering the account and password of the different system on the account binding page after logging into the current system. Once the different system verifies the binding, it will allow the binding, thus ensuring the validity and security of the account binding.
[0055] Further, step S2 includes the following steps:
[0056] S21. The first program system obtains the temporary passwordless login credential of the second program system based on the passwordless token;
[0057] S22. The first program system, carrying the passwordless login temporary credential, jumps to the second program system;
[0058] S23. The second program system verifies the passwordless login temporary credential, finds and determines the second account corresponding to the passwordless login temporary credential, generates the system login credential for the second account, and completes cross-system login access.
[0059] As described above, after establishing the binding relationship between the two program system accounts, a password-free token will be obtained, which can be used for password-free login and access to the corresponding account in the other system.
[0060] Please refer to Figure 7 A terminal for two-way account binding includes a processor, a memory, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, it performs the following steps:
[0061] S1. The first program system, based on the user's request for cross-system authorization login, redirects to the user authorization address of the second program system and obtains the user information of the second account in the second program system based on the authorization agreement;
[0062] S2. The first program system determines whether a matching first account exists based on the user information, establishes a binding relationship between the first account and the second account, and reports it to the second program system.
[0063] S3. The second program system stores the binding relationship and returns the associated passwordless token to the first program system for saving.
[0064] As can be seen from the above description, the beneficial effects of the present invention are as follows: The present invention provides a method for two-way account binding, which, when a user requests to log in using an account of another program system, obtains the user information of the user's account in the other system based on the authorization agreement, and retrieves the account corresponding to the current system based on the user information, thereby establishing a two-way binding relationship between the two accounts while ensuring security.
[0065] Furthermore, the user information includes data information that effectively identifies the user's true identity.
[0066] As described above, user information includes data that effectively identifies the user's real identity, ensuring that the bound accounts belong to the same user and guaranteeing the accuracy, validity, and security of account binding.
[0067] Please refer to Figure 8 A terminal for cross-system access based on two-way account binding includes a processor, a memory, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, it performs the following steps:
[0068] S1. After logging in, the first program system obtains the user's second account and second password information on the second program system based on the account binding operation initiated by the user, and actively initiates account binding with the second program system in order to obtain the password-free token returned by the second program system.
[0069] Alternatively, by following the steps in the above-described method for two-way account binding, a password-free token returned by the second program system can be obtained;
[0070] S2. The first program system logs in and accesses the second program system based on the passwordless token.
[0071] As can be seen from the above description, the beneficial effects of the present invention are as follows: The present invention provides a method for cross-system access based on two-way account binding, which realizes two-way binding of cross-system accounts, thereby enabling login to two or more systems through an account in one system, realizing two-way interoperability of system accounts, facilitating resource and data sharing and interoperability, and solving the problem of users having difficulty remembering passwords for multiple accounts.
[0072] Further, step S1 includes the following steps:
[0073] S11. After logging in, the first program system obtains the user's account and password information on the second program system based on the account binding operation initiated by the user.
[0074] S12. The first program system verifies the second account and the second password through the account binding page of the second program system, and receives the passwordless token and OpenId returned by the second program system.
[0075] S13. The first program system establishes a binding relationship between the passwordless token and OpenId and the user's first account logged in to the first program system, and reports the binding relationship to the second program system;
[0076] S14. The second program system stores the binding relationship.
[0077] As described above, account binding to different systems can be initiated by the user entering the account and password of the different system on the account binding page after logging into the current system. Once the different system verifies the binding, it will allow the binding, thus ensuring the validity and security of the account binding.
[0078] Further, step S2 includes the following steps:
[0079] S21. The first program system obtains the temporary passwordless login credential of the second program system based on the passwordless token;
[0080] S22. The first program system, carrying the passwordless login temporary credential, jumps to the second program system;
[0081] S23. The second program system verifies the passwordless login temporary credential, finds and determines the second account corresponding to the passwordless login temporary credential, generates the system login credential for the second account, and completes cross-system login access.
[0082] As described above, after establishing the binding relationship between the two program system accounts, a password-free token will be obtained, which can be used for password-free login and access to the corresponding account in the other system.
[0083] This invention is applicable to multi-program system scenarios, enabling the binding of accounts between different program systems and cross-system access.
[0084] Please refer to Figure 2 and Figure 3 Embodiment 1 of the present invention is as follows:
[0085] A method for two-way account binding includes the following steps:
[0086] S1. The first program system redirects to the user authorization address of the second program system based on the user's cross-system authorization login request, and obtains the user information of the second account in the second program system based on the authorization agreement.
[0087] In this embodiment, one case may refer to Figure 3 In one scenario, a user can first log in to the second program system and then access the first program system through the second program system, thereby generating a cross-system authorization login request and redirecting the user to the user authorization address of the second program system. In another scenario, a user has already logged into the second program system and, when logging into the first program system, chooses to log in using their account from the second program system, thus generating a cross-system authorization login request and redirecting the user to the user authorization address of the second program system.
[0088] In this embodiment, the second program system performs account authentication and authorization through the OAuth2.0 protocol, and returns the user's second account information in the second program system to the first program system. The user information includes data information that effectively identifies the user's real identity, such as mobile phone number and ID card number.
[0089] The steps for the second application system to authorize the first application system via the OAuth 2.0 protocol can be referred to as follows:
[0090] 1. Redirect to the user's authorized address (second program system);
[0091] 2. The second program system generates an Auth Code and returns it to the first program system;
[0092] 3. The first application system uses the Auth Code to request an Access Token from the second application system;
[0093] 4. The second program system generates an Access Token and returns it to the first program system;
[0094] 5. The first program system requests the user's OpenID from the second program system;
[0095] 6. The second program system generates an OpenId and returns it to the first program system;
[0096] 7. The first program system obtains user information from the second program system based on AccessToken + OpenId;
[0097] 8. System A returns user information to System B.
[0098] S2. The first program system determines whether a matching first account exists based on the user information, establishes a binding relationship between the first account and the second account, and reports it to the second program system.
[0099] In this embodiment, there are two scenarios. One is that the user has already registered an account in the first program system. In this case, the first program system determines whether the same account already exists based on the user information (matching user information such as mobile phone number), and then binds the account and saves the binding relationship.
[0100] After an account is matched, a verification step can be added. The first program system returns an account password page (or login page) for the user to enter. The user enters the correct account password, and the first program system verifies the account password, thereby further ensuring the validity and security of the account binding.
[0101] In another scenario, if the user has not yet registered an account in the first program system, the first program system will create a new account based on the user information, bind the account, and save the binding relationship.
[0102] The first program system will report the binding relationship to the second program system.
[0103] S3. The second program system stores the binding relationship and returns the associated passwordless token to the first program system for saving.
[0104] In this embodiment, the second program system stores the binding relationship and generates a passwordless token, which is then returned to the first program system. The first program system saves the passwordless token, including the binding relationship data, into its system.
[0105] Please refer to Figure 4 Embodiment two of the present invention is as follows:
[0106] A method for cross-system access based on two-way account binding includes the following steps:
[0107] S1. After logging in, the first program system obtains the user's second account and second password information on the second program system based on the account binding operation initiated by the user, and actively initiates account binding with the second program system in order to obtain the password-free token returned by the second program system.
[0108] Alternatively, the password-free token returned by the second program system can be obtained through the steps in the two-way account binding method described in Embodiment 1 above.
[0109] S11. After logging in, the first program system obtains the user's account and password information on the second program system based on the account binding operation initiated by the user.
[0110] S12. The first program system verifies the second account and the second password through the account binding page of the second program system, and receives the passwordless token and OpenId returned by the second program system.
[0111] S13. The first program system establishes a binding relationship between the passwordless token and OpenId and the user's first account logged in to the first program system, and reports the binding relationship to the second program system;
[0112] S14. The second program system stores the binding relationship.
[0113] In this embodiment, in addition to binding accounts between two program systems using the two-way account binding method described in Embodiment 1 above, it is also possible to refer to... Figure 4 Users can initiate account binding to the second program system from the first program system.
[0114] In this embodiment, the binding steps are as follows:
[0115] 1. The first program system redirects to the account binding page (second program system).
[0116] 2. Receive the second account and second password from the second program system and verify them.
[0117] 3. The second program system returns the passwordless token and OpenId to the first program system.
[0118] 4. The first program system saves the relationship (binding relationship) between the password-free token and OpenId and the current account.
[0119] 5. The first program system reports the binding relationship to the second program system.
[0120] 6. The second program system stores the binding relationship.
[0121] S2. The first program system logs in and accesses the second program system based on the passwordless token;
[0122] Step S2 includes the following steps:
[0123] S21. The first program system obtains the temporary passwordless login credential of the second program system based on the passwordless token;
[0124] S22. The first program system, carrying the passwordless login temporary credential, jumps to the second program system;
[0125] S23. The second program system verifies the passwordless login temporary credential, finds and determines the second account corresponding to the passwordless login temporary credential, generates the system login credential for the second account, and completes cross-system login access.
[0126] In this embodiment, it can be referred to Figure 5After completing the two-way account binding, users can log in across systems using the saved password-free token. An example of the steps is as follows:
[0127] 1. The first program system obtains the passwordless login temporary ticket of the second program system based on the passwordless token.
[0128] 2. The user is redirected to the second system using a temporary login ticket that allows them to log in without a password.
[0129] 3. The second procedure system verifies the passwordless login temporary ticket.
[0130] 4. The second procedure system searches for the corresponding account based on the passwordless login temporary ticket.
[0131] 5. The second program system generates a login ticket for this account in this system.
[0132] Furthermore, if the user's account two-way binding is completed through the steps of the account two-way binding method described in Embodiment 1 above, and the authorization protocol used is the OAuth 2.0 protocol, then it can be referred to Figure 6 The second system can also perform cross-system login based on the OAuth2.0 protocol. An example of the steps is as follows:
[0133] The second program system carries the Auth Code and redirects to the first program system;
[0134] The first system requests an Access Token from the second system based on the Auth Code;
[0135] After verifying the Auth Code, the second program system returns the Access Token and OpenId to the first program system. The first program system then uses the OpenId to query the second account corresponding to the first account currently logged in to the first program system, generates and returns the corresponding system login credentials.
[0136] For reference Figure 7 A terminal for two-way account binding includes a processor, a memory, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, it implements the steps of the two-way account binding method in Embodiment 1 above.
[0137] For reference Figure 8 A terminal for cross-system access based on two-way account binding includes a processor, a memory, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, it implements the steps of the method for cross-system access based on two-way account binding in Embodiment 2 above.
[0138] In summary, this invention enables two-way binding of cross-system accounts, allowing users to log in to two or more systems using a single system account. This facilitates two-way interoperability of system accounts, enabling resource and data sharing and communication, while also solving the problem of users having difficulty remembering passwords for multiple accounts.
[0139] The above description is merely an embodiment of the present invention and does not limit the patent scope of the present invention. Any equivalent modifications made based on the content of the present invention specification and drawings, or direct or indirect applications in related technical fields, are similarly included within the patent protection scope of the present invention.
Claims
1. A method for cross-system access based on two-way binding of accounts, characterized in that, The method comprises the steps of: S1, after login, the first program system acquires the second account and the second password information of the user on the second program system according to the account binding operation initiated by the user, initiatively initiates the account binding to the second program system, and obtains the password-free token returned by the second program system; S2, the first program system logs in and accesses the second program system according to the password-free token; Step S1 comprises the steps of: S11, after login, the first program system acquires the account and the password information of the user on the second program system according to the account binding operation initiated by the user; S12, the first program system checks the second account and the second password through the account binding page of the second program system, and receives the password-free token and OpenId returned by the second program system; S13, the first program system establishes a binding relationship between the password-free token and OpenId and the first account of the user logged in the first program system, and reports the binding relationship to the second program system; S14, the second program system stores the binding relationship; Step S2 comprises the steps of: S21, the first program system acquires the password-free login temporary credential of the second program system according to the password-free token; S22, the first program system jumps to the second program system carrying the password-free login temporary credential; S23, the second program system checks the password-free login temporary credential, finds and determines the second account corresponding to the password-free login temporary credential, generates the system login credential of the second account, and completes the cross-system login access. 2.A terminal for cross-system access based on account two-way binding, comprising a processor, a memory, and a computer program stored in the memory and executable on the processor, characterized in that, The processor executes the computer program to realize the following steps: S1, after login, the first program system acquires the second account and the second password information of the user on the second program system according to the account binding operation initiated by the user, initiatively initiates the account binding to the second program system, and obtains the password-free token returned by the second program system; S2, the first program system logs in and accesses the second program system according to the password-free token; Step S1 comprises the steps of: S11, after login, the first program system acquires the account and the password information of the user on the second program system according to the account binding operation initiated by the user; S12, the first program system checks the second account and the second password through the account binding page of the second program system, and receives the password-free token and OpenId returned by the second program system; S13, the first program system establishes a binding relationship between the password-free token and OpenId and the first account of the user logged in the first program system, and reports the binding relationship to the second program system; S14, the second program system stores the binding relationship; Step S2 comprises the steps of: S21, the first program system acquires the password-free login temporary credential of the second program system according to the password-free token; S22, the first program system jumps to the second program system carrying the password-free login temporary credential; S23, the second program system checks the password-free login temporary credential, finds and determines the second account corresponding to the password-free login temporary credential, generates the system login credential of the second account, and completes the cross-system login access. S23, the second program system verifies the password-free login temporary credential, finds and determines the second account corresponding to the password-free login temporary credential, generates a system login credential of the second account, and completes cross-system login access.
Citation Information
Patent Citations
Mutual authorization method among multiple system accounts as well as storage medium and processor
CN109639433A
Multi-platform account intercommunication method and device
CN109688150A