While using unity SDK Social Auto Login didn't find Public key

While using unity SDK Social Auto Login didn’t find Public key. How to get public key?

@abdullah.noborderz Welcome Aboard!

The sample response in Unity consists of the following parameters:

  "ed25519PrivKey": "666523652352635....",
  "privKey": "0ajjsdsd....",
  "coreKitKey": "0ajjsdsd....",
  "coreKitEd25519PrivKey": "666523652352635....",
  "sessionId": "....",
  "error": "....",
  "userInfo": {
    "aggregateVerifier": "w3a-google",
    "email": "john@gmail.com",
    "name": "John Dash",
    "profileImage": "https://lh3.googleusercontent.com/a/Ajjjsdsmdjmnm...",
    "typeOfLogin": "google",
    "verifier": "torus",
    "verifierId": "john@gmail.com",
    "dappShare": "<24 words seed phrase>", // will be sent only incase of custom verifiers
    "idToken": "<jwtToken issued by Web3Auth>",
    "oAuthIdToken": "<jwtToken issued by OAuth Provider>", // will be sent only incase of custom verifiers
    "oAuthAccessToken": "<accessToken issued by OAuth Provider>", // will be sent only incase of custom verifiers
    "isMfaEnabled": true // returns true if user has enabled mfa
  }
}

You can further decode the idToken to get the public key:

Sample response:

{
  "iat": 1655835494,
  "aud": "BCtbnOamqh0cJFEUYA0NB5YkvBECZ3HLZsKfvSRBvew2EiiKW3UxpyQASSR0artjQkiUOCHeZ_ZeygXpYpxZjOs",
  "iss": "https://api-auth.web3auth.io/",
  "email": "xyz@xyz.com",
  "name": "John Doe",
  "profileImage": "https://lh3.googleusercontent.com/a/AATXAJx3lnGmHiM4K97uLo9Rb0AxOceH-dQCBSRqGbck=s96-c",
  "verifier": "torus",
  "verifierId": "xyz@xyz.com",
  "aggregateVerifier": "tkey-google-lrc",
  "exp": 1655921894,
  "wallets": [
    {
      "public_key": "035143318b83eb5d31611f8c03582ab1200494f66f5e11a67c34f5581f48c1b70b",
      "type": "web3auth_key",
      "curve": "secp256k1"
    }
  ]
}

Hello thanks for reply.
I decoded and get following response. there I am getting two public keys 1st one type is web3auth_app_key and second one web3auth_threshhold_key.
why I am getting two public keys and which one I should use.


Also sharing piece of code if any one need can use :slight_smile:
image

Social Login Users | Documentation | Web3Auth Read the documentation for this

What exactly are you trying to accomplish ?

I already have wallet authentication in my project I want to extract public key for account from which user logged in and use it further for data management and NFTs.

how I get signature of wallet in response after connecting to Social auto login.
Please help.

Your request is under review and our team will get back with updates. Please be patient.

Hey @abdullah.noborderz

These problem are related to the blockchain connection which you need to do separately from Web3Auth SDK integration. We have demostrated here the integration using Nethereum Library which is the most used library in Unity EVM integrations. https://web3auth.io/docs/connect-blockchain/ethereum/unity

You can fetch the public key, get signatures and do all transactions on the blockchain using this library.

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.