# Multiterminal application login timing

sequenceDiagram
    participant client as Multiterminal application
    participant dev server as Developer Server
    participant wx server as WeChat interface service

    client->>client:wx.xxxLogin Obtain Code
    client->>dev Server: Send Code
    dev server->>wx server:code2Verifyinfo(appid+appsecret+code)
    wx server->>dev Server: Returns user identification information, etc.
    dev server->>dev Server: Build custom login state
    dev server->>Client: Returns custom login state
    client->>Client: Store custom login state
    client->>dev Server: business request, with custom login state
    dev server->>Client: Business Response

Timing Dxplaination

  1. wx.xxxLogin Represent different login methods,wx.weixinAppLoginwx.weixinMiniProgramLogin wx.phoneSmsLogin and wx.appleLogin Etc. call wx.xxxLogin Get Temporary Login Credentials (Code), and sent to the developer server.
  2. DeveloperGet Multiterminal Applications ID With KeyThe server-side interface is then invoked at the server code2Verifyinfo The user identification information is obtained, and a custom login state is constructed based on the information, which is used to identify the user identity when the front end and the back end interact in the subsequent business logic.