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

Was this helpful?

Sign in with MYKEY

PreviousIntroductionNextVerify signature at backend server

Last updated 4 years ago

Was this helpful?

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.

Process to sign in with MYKEY

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:

Web applications comply with SimpleWallet protocol (EOS) or WalletConnect protocol (ETH). MYKEY will automatically recognize the protocol by scanning the QR code to complete the authorized login.

Take a decentralized exchange using MYKEY scan code to sign in as an example:

Steps:

  1. MYKEY users scan the QR code to authorize login.

  2. MYKEY callback web application

Take a large-scale blockchain game as an example:

Steps:

  1. Environment preparation, add MYKEY Android SDK

  2. Initialize the SDK using the initSimple method

  3. Use the authorize method to authorize login

  4. The APP receives the user's MYKEY ID and address on the blockchain

Steps:

  1. Environment preparation, add MYKEY iOS SDK

  2. Initialize the SDK using the initSimple method

  3. Use the authorize method to authorize login

  4. The APP receives the user's MYKEY ID and address on the blockchain

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.

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:

b. For the Web3 protocol, use web3.eth's givenProvider method to get the user's account information. For sample code, see:

Web applications generate QR codes based on the JSON data that needs to be transferred. See the data structure to be transferred

Android application, integrate with , call the authorize method of SDK to complete the login.

(Optional) The APP queries the address from the public chain according to the user account and performs signature verification, also called signature verification. For different programming languages, we provide .

iOS application, integrate with , call the authorize method of SDK to complete the login.

(Optional) The APP queries the address from the public chain according to the user account and performs signature verification, also called signature verification. For different programming languages, we provide .

MYKEY Android SDK
sample code for verification at backend server
MYKEY iOS SDK
sample code for verification at backend server
H5 EOS Login
Web Application sign in with MYKEY
H5 ETH Login