Sign in with MYKEY
Last updated
Last updated
Sign in with MYKEY, that is, sign in to the APP or websites through MYKEY accounts, and enjoy the benefits of the MYKEY accounts: free use, support for multiple chains.
Currently MYKEY supports two mainstream public chains, ETH and EOS. Some users only have an account on one chain, that is, only one chain account and its public key addresses; some users have accounts on two public chains, when authorizing login, you can choose any public chain to sign and verify the signature.
The data transmitted by MYKEY to third-party applications include: the user's MYKEY ID, blockchain account and corresponding public key addresses.
Sign in with MYKEY, similar to the traditional OpenID technology of the Internet, third-party applications can identify users through MYKEY ID, can obtain the user's balance through the account on the blockchain, and determine the user's operating authority of the account through signature and verification.
Different third-party applications use different methods to sign in with MYKEY as a third-party login method.
H5 page, compatible with Scatter or Web3 protocol, then you can get the user's MYKEY ID and blockchain account to complete the login.
Take the H5 page of a decentralized exchange as an example:
Steps:
a. For the Scatter protocol, first use the method scatter.connect, then use the login method to obtain the user's account information. For sample code, see: H5 EOS Login
b. For the Web3 protocol, use web3.eth's givenProvider method to get the user's account information. For sample code, see: H5 ETH Login
There are two types of MYKEY accounts: self-service accounts and assisted accounts. The self-service accounts are at risk of irretrievable loss. Therefore, it is not recommended that third-party applications allow MYKEY autonomous accounts to authorize login. The third party can judge the account type based on the return of MYKEY.