Can you provide a way for RN SDK users to get compressed app_pub_key

Hi i sepnt a while trying to make this tutorial work for React native: Social Login Users | Documentation

There’s some things that won’t allow me to make this work for React native.

  • First of all it assumes that RN gets access to the provider which is not true.
  • Also it assumes that we can have the crypto library in RN which is not true

Can you help me figure out how to make this work? I would like to be able to have a RN app that can send some information to the server to verify it is logged in.

Thannks.

For RN, after logging in, you’ll receive a response that contains info of privKey and idToken. See the example response at Usage of React Native SDK | Documentation

For more info, please refer to this docs for RN: Usage of React Native SDK | Documentation
And our working examples for RN: examples/react-native at main · Web3Auth/examples · GitHub

Hey @ricardo.moguel Server Side Verification documented the way using authenticateUser function, doesn’t work on React Native. That function only works for Web Modal & No Modal SDKs, where it basically returns the id token directly.

For React Native SDK, you can use the login response, get the idToken, and send to your backend and verify it manually.

Hey @yashovardhan @tai.nguyen can you please give some guidance on how to verify the idToken manually on the backend?

Right now I’m not sure how I can do that without sending the app scoped private key in the request which seems like a very bad idea.

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