Web3Auth authentication with with React native

Is Web3Auth authentication not yet supported for react native ?
i’ve installed the react native web3auth package and set my authentication provider as “web3Auth” and set my clientId than after calling the function nothing happens just an undefined user is returned.
Am i missing something ?

Do you see any errors in the browser console?
You can use authError from useMoralis() hook to check errors that happened during authentication.

authError gives that i need to install @web3auth/web3auth, i installed it than it gave me an error i think because it is not compatible with react native.
Error is: While trying to resolve module superstruct from file /node_modules/@solana/web3.js/lib/index.native.js

Are you using Solana in your project? For that error, have a look at this page.

No its weird, i’am not using Solana i’am working with an EVM chain but after installing @web3auth/web3auth i’m not able anymore to start my app due to the previous error.
Do we have any sample for using web3auth & moralis with react native ? it is working with web but not with react native

There’s no official demo/example for Web3Auth/Moralis in a React-Native app.

Did you try any of the solutions in that link? Can you post your package.json?

I have a similar need. Does moralis support web3auth authentication with react native? I didn’t see an example for it.

Hey @sree,

we don’t but if you are using React native, you should be able to apply a lot of our existing sample code to your RN codebase.

You’ll just need a backend where you can call the Moralis Auth API to do the authentication and verification of signature.

For web3auth integration, I recommend that you look into web3auth RN SDK as it might work slightly different to the one in our docs as it only applies to web apps (and we’re using rainbowkit). You can check more of that here https://web3auth.io/docs/sdk/react-native/.

If you have any other questions, please open a new thread as this one is old and I shall close it now.

Hope this helps!