Cross-device authentication method and apparatus
A cross-device authentication method includes: a login authentication initiation device that determines, from at least one electronic device, a login authentication device of a to-be-authenticated application, where an authentication application is installed on the login authentication device, and the authentication application is logged in; and sends a first login authentication request to the login authentication device; the login authentication device displays an account login interface of the authentication application based on the first login authentication request, where the account login interface includes a first button indicating to approve authorization and a second button indicating to reject authorization; obtains an operation instruction when a user performs a tapping operation on a first button or a second button; and feeds back a first login authentication response to the login authentication initiation device.
1 . A method comprising:
determining a login authentication device of a to-be-authenticated application by:
sending a query request to one or more electronic devices to enable the one or more electronic devices to separately determine whether the one or more electronic devices have an account authorization capability of an authentication application, wherein the query request comprises first identification information and account login indication information;
receiving, from at least one electronic device having the account authorization capability in the one or more electronic devices, a query response comprising a device identifier of the at least one electronic device;
determining a unique electronic device as the login authentication device in response to the at least one electronic device comprises only the unique electronic device; and
in response to the at least one electronic device comprising multiple electronic devices:
displaying the multiple electronic devices on a screen for selection by a user;
receiving a selection from the user; and
determining, from among the multiple electronic devices and in response to the selection, a selected electronic device as the login authentication device;
sending, to the login authentication device, a first login authentication request comprising the account login indication information and the first identification information of the authentication application; and
obtaining, from the login authentication device, a first login authentication response comprising indication information of a login authentication result that is based on the account login indication information and the first identification information.
2 . The method of claim 1 , wherein determining the login authentication device further comprises identifying a trusted network comprising electronic devices that have a trusted relationship, wherein the trusted network comprises the one or more electronic devices.
3 . The method of claim 1 , further comprising receiving, from a login authentication platform, the first login authentication response, and wherein the first login authentication response is based on a second login authentication response from the login authentication device to the login authentication platform.
4 . The method of claim 1 , wherein before determining the login authentication device, the method further comprises:
sending, to a login authentication platform, a second login authentication request comprising second identification information of the to-be-authenticated application; and
receiving, from the login authentication platform, a second login authentication response comprising the first identification information and the account login indication information.
5 . The method of claim 1 , wherein after obtaining the first login authentication response, the method further comprises:
entering a user interface of the to-be-authenticated application in response to the indication information indicating that login authentication has succeeded; and
exiting the to-be-authenticated application in response to the indication information indicating that the login authentication has failed.
6 . The method of claim 1 , wherein after obtaining the first login authentication response, the method further comprises:
entering a user interface of the to-be-authenticated application in response to the indication information indicating that login authentication has succeeded; and
popping up a window indicating that the login authentication has failed in response to the indication information indicating that the login authentication has failed.
7 . A method applied to a device and comprising:
receiving, from a login authentication initiation device, a first login authentication request comprising identification information of an authentication application and account login indication information;
determining, in response to first login authentication request and based on the authentication application being installed and accessed on the device, that the device has account authorization capability of the authentication application;
displaying, based on the account authorization capability, an account login interface of the authentication application, wherein the account login interface comprises a first button indicating to approve authorization and a second button indicating to reject the authorization;
obtaining an operation instruction that is based on a tapping operation of a user on the first button or the second button, wherein the operation instruction comprises a login authentication result; and
feeding back, to the login authentication initiation device, a first login authentication response comprising indication information of the login authentication result.
8 . The method of claim 7 , wherein before receiving the first login authentication request, the method further comprises:
receiving, from the login authentication initiation device, a query request comprising the identification information and the account login indication information; and
sending, to the login authentication initiation device, a query response comprising a device identifier in response to the login authentication initiation device having the account authorization capability.
9 . The method of claim 7 , wherein feeding back the first login authentication response comprises sending, to a login authentication platform, a second login authentication response to enable the login authentication platform to send, based on the second login authentication response, the first login authentication response to the login authentication initiation device.
10 . The method of claim 7 , wherein the authentication application is accessed on the device when the authentication application is logged in.
11 . A device comprising:
a memory configured to store instructions; and
one or more processors coupled to the memory and configured to execute the instructions to cause the device to:
determine a login authentication device of a to-be-authenticated application, wherein the login authentication device comprises an authentication application, and wherein the authentication application is logged in, wherein the one or more processors are further configured to execute the instructions to cause the device to further determine the login authentication device by:
sending a query request to one or more electronic devices to enable the one or more electronic devices to separately determine whether the one or more electronic devices have an account authorization capability of the authentication application, wherein the query request comprises first identification information and account login indication information;
receiving, from at least one electronic device having the account authorization capability in the one or more electronic devices, a query response comprising a device identifier of the at least one electronic device;
determining a unique electronic device as the login authentication device in response to the at least one electronic device comprises the unique electronic device; and
in response to the at least one electronic device comprises multiple electronic devices:
displaying the multiple electronic devices on a screen for selection by a user; and
determining an electronic device selected by the user as the login authentication device;
send, to the login authentication device, a first login authentication request comprising the account login indication information and the first identification information; and
obtain, from the login authentication device, a first login authentication response comprising indication information of a login authentication result that is based on the account login indication information and the first identification information.
12 . The device of claim 11 , wherein the one or more processors are further configured to execute the instructions to cause the device to further determine the login authentication device by identifying a trusted network comprising at least two electronic devices that have a trusted relationship, wherein the trusted network comprises the one or more electronic devices.
13 . The device of claim 11 , wherein the one or more processors are further configured to execute the instructions to cause the device to receive, from a login authentication platform, the first login authentication response, wherein the first login authentication response is based on a second login authentication response received by the login authentication platform from the login authentication device.
14 . The device of claim 11 , wherein the one or more processors are further configured to execute the instructions to cause the device to:
send, to a login authentication platform, a second login authentication request comprising second identification information of the to-be-authenticated application; and
receive, from the login authentication platform, a second login authentication response comprising the first identification information and the account login indication information.
15 . The device of claim 11 , wherein the one or more processors are further configured to execute the instructions to cause the device to:
enter a user interface of the to-be-authenticated application when the indication information indicates that login authentication has succeeded; and
exit the to-be-authenticated application when the indication information indicates that the login authentication has failed.
16 . The device of claim 11 , wherein the one or more processors are further configured to execute the instructions to cause the device to:
enter a user interface of the to-be-authenticated application when the indication information indicates that login authentication has succeeded; and
pop up a window indicating that the login authentication has failed when the indication information indicates that the login authentication has failed.
17 . A device comprising:
a memory configured to store instructions; and
one or more processors coupled to the memory and configured to execute the instructions to cause the device to:
receive, from a login authentication initiation device, a first login authentication request comprising identification information of an authentication application and account login indication information;
determine, in response to first login authentication request and based on the authentication application being installed and accessed on the device, that the device has account authorization capability of the authentication application;
display, based on the first login authentication request and the account authorization capability, an account login interface of the authentication application, wherein the account login interface comprises a first button indicating to approve authorization and a second button indicating to reject the authorization;
obtain an operation instruction generated when a user performs a tapping operation on the first button or the second button, wherein the operation instruction comprises a login authentication result; and
feed back, to the login authentication initiation device, a first login authentication response comprising indication information of the login authentication result that is based on the account login indication information and the identification information.
18 . The device of claim 17 , wherein the one or more processors are further configured to execute the instructions to cause the device to:
receive, from the login authentication initiation device, a query request comprising the identification information and the account login indication information; and
send, to the login authentication initiation device, a query response comprising a device identifier when the device has the account authorization capability.
19 . The device of claim 17 , wherein the one or more processors are further configured to execute the instructions to cause the device to send, to a login authentication platform, a second login authentication response to enable the login authentication platform to send, based on the second login authentication response, the first login authentication response to the login authentication initiation device, and wherein the login authentication platform is configured to provide a login authentication service of the authentication application.
20 . The device of claim 17 , wherein the authentication application is accessed on the device when the authentication application is logged in.