We are currently developing a web 3.0 app that aims to register new crypto wallets using Twitter login. We’re utilizing the web3auth library to connect the wallet with social login and auth0 to handle the linking process with Twitter. So far, we have successfully implemented the Twitter login functionality, created new wallet accounts based on registered Twitter accounts, and stored them in our database.
However, we are encountering an issue when attempting to retrieve additional user information from Twitter and add it to our database. We have reviewed the Twitter API documentation and made attempts to retrieve the data but have been unsuccessful thus far.
Upon logging in using Twitter, we receive a callback response from web3auth with the following information:
Unfortunately, we are unable to use any of the provided tokens to establish a connection with the Twitter API and retrieve the desired information, similar to the response obtained from the https://api.twitter.com/1.1/account/verify_credentials.json API
Have you attempted to decode the idToken that we provide? It contains additional information about users.
I have included a decoded token that was given after using Web3Auth to log in to Twitter.
If you are utilizing a custom verifier and have inputted your Twitter credentials while setup, you can extract the oAuthAccessToken from the response to access additional information through API calls.
Please use a custom twitter verifier to get more details from Auth0 in oAuthIdToken and oAuthAccessToken. And use the oAuthAccessToken to make direct API calls to get more info directly from twitter.