How to know if user signed up or logged in through auth0

Hello!

I have a web3 and auth0 No Modal SDK setup, following this example.

https://github.com/Web3Auth/web3auth-pnp-examples/tree/main/web-no-modal-sdk/custom-authentication/single-verifier-examples/auth0-no-modal-example

After login, I see that this endpoint:

https://session.web3auth.io/store/get?key=04c....

is returning a json object like this one:

{
    "iv": "b8bee54a01db3c7185569a658343fc10",
    "ephemPublicKey": "04822027395cd....",
    "ciphertext": "c4aa70b138....",
    "mac": "fd8......"
}

and it’s returning this same one for user registration or user login.

I want to know when a user signs up, so I can execute some logic after that, is there a way to pass on that json object a flag that says if the user has registered and not just signed in?

hi @benharkatdjalil

I’m really sorry for the delay in getting back to you. I understand how important this is, and I want to ensure you receive the most accurate and helpful information possible. I’m going to discuss this with our team to provide you with a precise answer.

Thank you for your patience and understanding.

By utilizing the getUserInfo function, you gain access to the user’s details upon onboarding. With this information, you have the ability to query your database to determine whether the user already exists, enabling you to appropriately categorize them. Furthermore, you have the option to leverage our server-side verification functionality (detailed at Using Server Side Verification with Web3Auth | Web3Auth) to ascertain whether the user is new or returning based on their wallet address.

1 Like

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