MYKEY Docs
中文English
English
English
  • Introduction
  • Sign in with MYKEY
    • Verify signature at backend server
    • More detailed tech and process of MYKEY login
  • Integrate with MYKEY
    • Multiple ways to integration with MYKEY
    • Mobile Dapp with H5 pages
      • ETH
      • EOS
      • JS Extensions
    • Integration via MYKEY Android SDK
      • Preconditions
      • Initiate SDK
      • Authorize
      • Sign
      • Transfer
      • Call contracts
    • Integration via MYKEY iOS SDK
      • Preconditions
      • Initiate SDK
      • Authorize
      • Sign
      • Transfer
      • Call contracts
    • Web application with scanning qrcode
    • SimpleWallet Protocol Compatible
    • Deeplink Protocol
  • Dive into MYKEY
    • Dive into MYKEY account
    • Classes and methods
      • Android Classes
      • iOS Classes
    • Error Code
    • Identify MYKEY deposit transaction
      • ETH deposit
      • EOS deposit
    • MYKEY Whitepaper
  • KEY ID
    • KEYID ETH Contracts introduction
      • Account Module
      • Account Storage Module
      • Logic Management Module
      • Logic Module
    • Account recovery mechanism
    • KEYID contract upgrade process
    • KEYID contract upgrade records
      • ETH
        • KEY ID Ethereum Contracts Upgrade Pending Time Adjustment
        • KEY ID Ethereum logic contract module upgrade announcement
        • KEY ID Ethereum Contracts Upgrade Pending Time Adjustment
        • KEY ID Ethereum AccountLogic/DualsigsLogic Contracts Upgrade
        • KEY ID Ethereum DappLogic Contract Upgrade
  • Development Resources
    • Ethereum
    • EOS
  • Join Us
    • DApp submit
    • Developers Community
Powered by GitBook
On this page
  • technology principle of login with MYKEY
  • authentication process of login with MYKEY
  • 1. Initiate an authentication request‌
  • 2. Sign / return receipt
  • 3. Parse receipt, request public key
  • 4. Returns the reserved key and its status‌
  • 5. Verify signature

Was this helpful?

  1. Sign in with MYKEY

More detailed tech and process of MYKEY login

PreviousVerify signature at backend serverNextMultiple ways to integration with MYKEY

Last updated 4 years ago

Was this helpful?

MYKEY login allows the use of MYKEY account login to access third-party applications and send blockchain transactions, with the following characteristics:‌

  • Protected unmanaged blockchain account

  • Free to use blockchain

  • Multi-chain support and multi-language services

technology principle of login with MYKEY

MYKEY login relies on ECDSA-secp256k1's signature and verification methods. A third-party application initiates a login request. The user provides a specified signature through MYKEY. The third-party application verifies the validity of the signature and completes the authentication.‌

authentication process of login with MYKEY

‌

1. Initiate an authentication request‌

A third-party application initiates an authentication request, MYKEY adopts different processing strategies according to the channel.‌

(1)H5 Pages‌

MYKEY is compatible with the scatter protocol and the web3 protocol. You can use the methods of the scatter and web3 JS libraries to obtain account information and complete login.‌

(2)PC WEB‌

The third-party application encodes the request parameters into a QR Code and displays it according to the SimpleWallet or WalletConnect protocol. The code is scanned and authorized using MYKEY, then the third-party application is called back to complete the login.‌

(3)APP‌

After accessing the SDK, and the SDK is initialized, you can directly call the authority method to wake up MYKEY.‌

2. Sign / return receipt

MYKEY receives and parses parameters, and returns user account information based on the passed parameters.‌

(1)parameter: chain‌

The value of parameter chain could be ANY, EOS or ETH.‌

If the parameter chain is ANY, or the chain parameter is not passed, MYKEY selects the chain for authorizing in the default order (EOS first, then ETH).‌

If the parameter chain is specified, MYKEY will query the account of the specified chain and return account information.‌

If the user does not have an account on the targeted chain, the account returned by MYKEY is empty, and the third-party application may prompt the user to open an account on the chain.‌

3. Parse receipt, request public key

The third-party application parses the return receipt of MYKEY to obtain the user's mykeyId and the user account.‌

(1) Check if the mykeyId is registered‌

If the mykeyId has not been registered, then register mykeyId and the user address of the corresponding chain in the local database, and select a chain to query the user account.‌

If the mykeyId already registered, then directly select the account associated with the original mykeyId as the query address‌

(2) Query reserved key and its status‌

Third-party applications that do not have high security requirements can also directly trust the public key returned by MYKEY.‌

4. Returns the reserved key and its status‌

Blockchain service provider or MYKEY returns the reserved key information of the corresponding address, and its status.‌

5. Verify signature

If the state of the reserved key is not available (status != 0), it will directly return failure.‌

Third-party applications can choose to directly query the user's ETH public key through blockchain services, such as infura, and dfuse to query the user's EOS public key. The index 3 of public key is the reserved key. For the query method, please refer to Obtaining the ReservedKey in the sample .‌

If the reserved key is available, check (1) whether the signature corresponds to the user's reserved key; (2) whether the content of the signature is the same as the content of the request. If the verification succeeds, it returns success, otherwise it returns the authorization failure. For the sample code of the third-party application server to verify the signature, refer to the sample .

For more technical details, please refer to .

Verify signature at backend server
Verify signature at backend server
More detailed tech and process of MYKEY login