Apparatus and method for providing login function of application in electronic device
Various embodiments of the disclosure provide a method of providing a login function (or a login service) of an application and an electronic device supporting the same. An electronic device according to an embodiment of the disclosure may include: a display module including a display, a memory, and a processor operatively connected to the display module and the memory. The processor may be configured to: detect a trigger for performing a login function of a first application; extract first account information used for the login function of the first application; determine whether the first account information includes second account information of a second application which can be linked to the first application; based on the second account information being included, provide the second application which is usable and the second account information in a login screen related to the first application displayed on the display module.
1 . An electronic device comprising:
a display;
at least one processor, comprising processing circuitry, operatively connected to the display; and
memory storing instructions that, when executed by the at least one processor, cause the electronic device to:
execute a first application,
identify first account information stored in the memory for logging into the first application,
determine whether the identified first account information is associated with second account information of a second application, wherein the second account information is usable for logging into the first application,
based on determining that the first account information is not associated with second account information of a second application, display one or more fields including the first account information on a login screen related to the first application displayed on the display and in response to a user input, log into the first application using the first account information,
based on determining that the first account information is associated with second account information of a second application, display one or more fields including the first account information on the login screen related to the first application and display one or more visual objects related to the second account information in the login screen related to the first application, each of the one or more visual objects being actuatable for providing login information for the login screen related to the first application based on corresponding second account information, and
based on detecting a selection of one of the one or more visual objects, log into the first application using the second account information.
2 . The electronic device of claim 1 , wherein the instructions, when executed by the at least one processor, cause the electronic device to:
store input account information, based on a login function configuration in the first application, and
based on the input account information being stored, identify reference information related to the first application and map and store the input account information and the reference information.
3 . The electronic device of claim 2 ,
wherein the reference information comprises a unique value of the first application and a web domain address corresponding to a login screen of the second application,
wherein the unique value comprises at least one of a package name or a package signature, and
wherein the web domain address comprises a uniform resource identifier (URI) or a uniform resource locator (URL).
4 . The electronic device of claim 1 , wherein the instructions, when executed by the at least one processor, cause the electronic device to determine whether the first account information is associated with the second account information, based on at least one specified condition,
wherein the specified condition comprises at least one determination condition for identifying the second account information.
5 . The electronic device of claim 4 , wherein the instructions, when executed by the at least one processor, cause the electronic device to identify the second account information based on a first web domain address corresponding to a login screen of the second application corresponding to a first unique value of the first application being different from a second web domain address corresponding to a second unique value of the first application stored in the memory.
6 . The electronic device of claim 5 , wherein the instructions, when executed by the at least one processor, cause the electronic device to, based on identifying an item having the first unique value and the second unique value, which are identical to each other, and having no web domain address, identify account information having a web domain address as the second account information.
7 . The electronic device of claim 4 , wherein the instructions, when executed by the at least one processor, cause the electronic device to, based on a first unique value and a first web domain address acquired from the first application being different from a second web domain address corresponding to a second unique value corresponding to a value identical to the first unique value stored in the memory and based on a third unique value of a third application being stored in the memory as the second web domain address, identify account information having the second web domain address as the second account information.
8 . The electronic device of claim 4 , wherein the instructions, when executed by the at least one processor, cause the electronic device to, based on a positive response for a social account of a web domain address being received from a server through communication with the server, identify the second account information.
9 . The electronic device of claim 1 , wherein at least one of the one or more the visual objects provides guidance about the second account information.
10 . The electronic device of claim 9 , wherein the second account information comprises one or more pieces of account information and each visual object corresponds to a respective one of the second account information pieces, and
wherein the instructions, when executed by the at least one processor, cause the electronic device to:
provide the visual objects to be distinguished from each other, based on priority associated with the corresponding second account information piece,
detect an input for a selected one of the visual objects, and
provide login information for the first application using the second account information piece corresponding to the selected visual object.
11 . A method of operating an electronic device, the method comprising:
executing a first application;
identifying first account information stored in memory for logging into the first application;
determining whether the identified first account information is associated with second account information of a second application, wherein the second account information is usable for logging into the first application;
based on determining that the first account information is not associated with second account information of a second application, displaying one or more fields including the first account information on a login screen related to the first application displayed on the display and in response to a user input, logging into the first application using the first account information;
based on determining that the first account information is associated with second account information of a second application, displaying one or more fields including the first account information on the login screen related to the first application and displaying one or more visual objects related to the second account information in the login screen related to the first application, each of the one or more visual objects being actuatable for providing login information for the login screen related to the first application based on corresponding second account information; and
based on detecting a selection of one of the one or more visual objects, logging into the first application using the second account information.
12 . The method of claim 11 , further comprising:
storing input account information, based on a login function configuration in the first application.
13 . The method of claim 12 , further comprising:
identifying reference information related to the first application based on the account information being stored and mapping the input account information and the reference information.
14 . The method of claim 13 ,
wherein the reference information comprises a unique value of the first application and a web domain address corresponding to a login screen of the second application,
wherein the unique value comprises at least one of a package name or a package signature, and
wherein the web domain address comprises a uniform resource identifier (URI) or a uniform resource locator (URL).
15 . The method of claim 11 , further comprising determining whether the first account information is associated with the second account information, based on at least one specified condition, and
wherein the specified condition comprises at least one determination condition for identifying the second account information.
16 . The method of claim 15 , further comprising:
identifying the second account information based on a first web domain address corresponding to a login screen of the second application corresponding to a first unique value of the first application being different from a second web domain address corresponding to a second unique value of the first application stored in a memory.
17 . The method of claim 15 , further comprising:
identifying account information having a web domain address as the second account information based on a first unique value and a first web domain address of the first application being different from a second web domain address corresponding to a second unique value corresponding to a value identical to the first unique value stored in the memory and based on a third unique value of a third application being stored in the memory as the second web domain address.
18 . The method of claim 15 , further comprising:
identifying the second account information based on a positive response for a social account of a web domain address being received from a server through communication with the server.
19 . The method of claim 11 , wherein at least one of the one or more visual objects provides guidance about the second account information.