Skip to content

Mod sign OpenID

OpenID ProviderModSignOpenIDAccountDAppUserOpenID ProviderModSignOpenIDAccountDAppUserInitiate OpenID authenticationrequest_authenticationRedirect to OpenID providerAuthenticate and authorizeReturn authorization codeSubmit authorization codeExchange code for ID tokenReturn ID token and user claimsregister_openid_user(id_token)Store OpenID user associationConfirm registrationDisplay registration success

OpenID ProviderModSignOpenIDValidationModuleAccountDAppUserOpenID ProviderModSignOpenIDValidationModuleAccountDAppUserRequest token transferexecute_user(token_transfer_operation)Select validation module based on scopeis_valid_operation(token_transfer_operation)is_valid_signature(signature)Select sign moduleverify_openid_signature(id_token)Decode and verify ID tokenRetrieve public key for token validationReturn public keyValidate token signature using public keyReturn (valid/invalid)Return (valid/invalid)Execute token transfer operationReturn transaction status

ModSignOpenID is a module within the Veive protocol that introduces authentication and signing via OpenID Connect. OpenID Connect is an authentication standard based on OAuth 2.0 that allows users to authenticate using external identity providers. This module enables linking an OpenID account to a Veive address and validating signatures based on ID tokens issued by the provider.

OpenID Connect is a widely adopted authentication protocol supported by major providers such as Google, Microsoft, and others. This means that with a single click, users from the Web2 ecosystem can seamlessly interact with blockchain-based applications without needing to create new credentials. By leveraging OpenID Connect, Veive significantly lowers the entry barrier to blockchain adoption, making it accessible to a broader audience while ensuring security and interoperability.

  • ID Token: A token signed by the OpenID provider containing user authentication information.
  • Public Key: The OpenID provider’s public key used to verify the ID token signature.
  • User Claims: Information about the user returned by the OpenID provider.
  1. Registration:
    • Users register by authenticating via an OpenID provider, which generates an ID token. The register_openid_user method stores the association between the OpenID user ID and the Veive account.
  2. Signature Validation:
    • When an operation requires an OpenID signature, the verify_openid_signature method is called to validate its authenticity. This process includes:

      1. Decoding the ID token to extract the header, payload, and signature.
      2. Retrieving the OpenID provider’s public key to validate the signature.
      3. Verifying the ID token signature using the provider’s public key.
      4. Checking the claims to ensure the operation is authorized by the user.

      If all steps are successful, the operation is approved.