Has anybody gotten internet identity to work in React Native? I’ve gotten a simple app running with this example https://github.com/decentralised-social/expo-rn-dfinity-icp-example, but I can’t find any documentation on integrating with Internet Identity.
The problem I keep running into is that @dfinity/agent and other related packages are built for the browser and so window.addEventListener() and localStorage are not supported.
4 Likes
im farmiliar with it in react. i dont know if the two are similar, i think so. ive been fighting it for 3 days id say ive got a bit knowledge
were you able to get a solution?
This is on my near-term to-do list. We’re waiting on security approval of a non-wasm BLS verification strategy, and then I’ll work on an auth-client React Native example using Expo.
3 Likes
so its safe to say that there is no way i can link internet identity with react native?i actually wanted to make a mobile app with react native but i am confirming how to go about that first and see if its safe to continue @kpeacock
It’s not impossible - it’s just that we don’t have an audited BLS verification strategy for React Native yet, and the example isn’t ready.
You could start developing your app today by passing blsVerify: ()=>true
to your H̶t̶t̶p̶A̶g̶e̶n̶t̶
Actor
, and you could use this native app example as a reference to build your app while we work on the BLS signature verification
2 Likes
awesome thank you for you feedback
i will start it then post the error incase i get it
I made this repo, maybe it could be helpful for you:
This is coming soon! We’re reviewing the change to use @noble/curves
for BLS verification. Once that’s in, it will be really easy to use Expo with React Native.
I have a proof of concept with Internet Identity login for ios here: GitHub - krpeacock/ic-expo-mvp: MVP example of Expo making an IC mainnet call
Full examples will come once we get @dfinity/agent
released with no wasm imports
You can track the PR here: feat: pure JS BLS verification by krpeacock · Pull Request #817 · dfinity/agent-js · GitHub
2 Likes
Is for now possible to authenticate from a react-native expo app?