[Archive] Dappshare is not returned by getUserInfo() after successful login

:classical_building: Archived Content from Web3Auth Community

This topic was originally posted by anjali.gian on 5/2/2023.
This content has been migrated from our previous community forum to preserve valuable discussions.


I used the code from the demo example w3a-firebase-demo. I have a custom verifier and used that to login. After successfully login, I don’t see dappshare returned. How do I get that?

Please provide the following details too when asking for help in this category:

  • SDK Version: 5.1

  • Platform: Web

  • Browser Console Screenshots:

  • Related to Custom Authentication? Please provide the following info too: (Optional)

    • Verifier Name: artifact-firebase-testnet
    • JWKS Endpoint:
    • Sample idToken(JWT)
      eyJhbGciOiJSUzI1NiIsImtpZCI6ImU3OTMwMjdkYWI0YzcwNmQ2ODg0NGI4MDk2ZTBlYzQzMjYyMjIwMDAiLCJ0eXAiOiJKV1QifQ.eyJpc3MiOiJodHRwczovL3NlY3VyZXRva2VuLmdvb2dsZS5jb20vYWR0ZXN0LTk2YWJlIiwiYXVkIjoiYWR0ZXN0LTk2YWJlIiwiYXV0aF90aW1lIjoxNjgzMDAyMTg0LCJ1c2VyX2lkIjoidkluMU5sbUdKNll0d2NUZ25SZXFQbEtrNFFNMiIsInN1YiI6InZJbjFObG1HSjZZdHdjVGduUmVxUGxLazRRTTIiLCJpYXQiOjE2ODMwMDIxODQsImV4cCI6MTY4MzAwNTc4NCwiZW1haWwiOiJ0ZXN0MUBnbWFpbC5jb20iLCJlbWFpbF92ZXJpZmllZCI6ZmFsc2UsImZpcmViYXNlIjp7ImlkZW50aXRpZXMiOnsiZW1haWwiOlsidGVzdDFAZ21haWwuY29tIl19LCJzaWduX2luX3Byb3ZpZGVyIjoicGFzc3dvcmQifX0.gOh8Z3ewAOtsDxqmITaU49ZN2_-TZj-ypvIZKV8o_NygUJ6mGseLJOmL1ztU6dTFy5TKLtg7TVl-6i7oSsojaS5umGTv-axPpdAJP8RG9CmOXTwPuLufQoGMFMPneQ_MOn1wFzgNFOiLfHidfTXSyvw0U-_poLKYiagft5C-ghUv9HnkcHG6_1LLA9T4I7pEnKRwooQjBVeomNpta91u-7xk-7BdI2ln3eLCqPHtXnc93RiHdsLhOqcGzDMZrpgckfFMC0pbQXArGg34AQ9bxwmWnthJHT6WL3MFgzTU0hcBZJniV59G80E6GNGS9OKCYC4qeqMHKS0R4RBlvx2iRg

Please provide the Web3Auth initialization and login code snippet below:
const web3auth = new Web3AuthNoModal({
clientId,
chainConfig: {
chainNamespace: CHAIN_NAMESPACES.EIP155,
chainId: “0x5”,
},
web3AuthNetwork: “testnet”,
//web3AuthNetwork: “cyan”,
useCoreKitKey: false,
});

    const openloginAdapter = new OpenloginAdapter({
      adapterSettings: {
        uxMode: "redirect",
        loginConfig: {
          jwt: {
            //verifier: "web3auth-firebase-examples",
            verifier: "artifact-firebase-testnet",
            typeOfLogin: "jwt",
            clientId,
          },
        },
      },
    });
    web3auth.configureAdapter(openloginAdapter);
    setWeb3auth(web3auth);
await web3auth.init();
if (web3auth.provider) {
  setProvider(web3auth.provider);
}

const web3authProvider = await web3auth.connectTo(
WALLET_ADAPTERS.OPENLOGIN,
{
loginProvider: “jwt”,
extraLoginOptions: {
id_token: idToken,
verifierIdField: “sub”,
domain: “http://localhost:3000”,
},
}
);
setProvider(web3authProvider);

Hey @anjali.gian

Did you enable MFA for this user?

Screenshot 2023-05-02 at 5.37.04 PM
Screenshot 2023-05-02 at 5.37.04 PM977Ă—196 26.2 KB

Yes I enabled MFA and was able to get the dapp share. We don’t require MFA for our users, so without enabling MFA we will not be able to get the dapp share?

Awesome.

Yes, that’s correct. In order to use dApp Share, it is necessary for the user to activate MFA.