-
Notifications
You must be signed in to change notification settings - Fork 75
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
docs(sdk): React native passkeys tutorial #663
Conversation
Branch preview✅ Deployed successfully in branch deployment: |
Overall readability score: 30.91 (🟢 +0.12)
View detailed metrics🟢 - Shows an increase in readability
Averages:
View metric targets
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Strong work! 💪 A few small remarks to help the user get to the end of the tutorial
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hey, this is a great tutorial and a great use case. It was "relatively" easy to follow along, given the complexity of developing and running a mobile app.
However, the last step needs rework. It is important to handhold the developer, and to distuingish between iOS and Android (for example with Tabs). So we really need to be cristal clear and provide good guidance (better guidance than Apple and Google). I was unfortunately not able to add a passkey to the Safe on an Android Emulator. The Safe got deployed, though.
Additional to that, I would like to see some explanatory comments in the code, to guide the developer on what to look out for (as I mentioned in a comment).
When this is added, we need to retest it on Android and on iOS.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This review includes the first comments after testing. It worked on iOS and did not work on Android (yet).
|
||
const txResult = await protocolKit.executeTransaction(signedAddOwnerTx); | ||
|
||
const receipt = await waitForTransactionReceipt(client, { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this client is undefined, right? It seems that the function holds here and the app shows a loading spinner for ever.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
|
||
We will use emulators and development builds in this tutorial, so please refer to the relevant sections in the Expo documentation for proper configuration. If you know how to do that or want to use a physical device, you can skip these steps. If you only want to test one platform, that's fine too, you only need to follow one of the steps below: | ||
|
||
- [**Android Studio Emulator**](https://docs.expo.dev/get-started/set-up-your-environment/?platform=android&device=simulated&mode=development-build) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We can mention that the steps to “Create a development build” using expo are optional as we are executing the app locally in both Android and iOS setups
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, you say on line 69 that we can skip these steps if we know what we do ;)
It's mandatory to add the plugins section in the app.json
This is not reflected in any place |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hey, I went through it again, and still could not get the passkey working on Android.
I added two comments.
- Have enrolled to the [Apple Developer Program](https://developer.apple.com/programs/enroll/) and installed [Xcode](https://developer.apple.com/xcode/) (if you want to test the app on iOS) | ||
- Have downloaded and installed [Android Studio](https://developer.android.com/studio) and have a Google account connected to your emulator (if you want to test the app on Android) | ||
- Have a [ngrok](https://ngrok.com/) account to create an HTTPS tunnel to your server. | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Add the requirement, that the local java version should be 17.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's mentioned on l.74, do you want to add another one here?
* chore(sdk): Update passkeys documentation (#649) * docs(sdk): React native passkeys tutorial (#663) * Write tutorial * Upload GIF * Some improvements * Update image * Vale * Some improvements * Some improvements * Some fixes and improvements * Update pages/advanced/passkeys/tutorials/react-native.mdx * Update pages/advanced/passkeys/tutorials/react-native.mdx * Update pages/advanced/passkeys/tutorials/react-native.mdx * Update pages/advanced/passkeys/tutorials/react-native.mdx * Update pages/advanced/passkeys/tutorials/react-native.mdx * Update pages/advanced/passkeys/tutorials/react-native.mdx * Update pages/advanced/passkeys/tutorials/react-native.mdx * Add react-native-passkeys tutorial to generateCodeExamples.js script * Switch generateCodeExamples.js to TypeScript * Run generateCodeExamples.ts * Add Xcode to Vale whitelist * Import style changes from tutorial repo * Implement requested changes * Implement requested changes * Fix vale errors * Revert requested change l.93 and fix formatting issue * Fix instructions for iOS * Reupload iOS assets * Fix typo * Add app.json to the code examples * Streamline iOS flow; implement requested changes * Fix typo --------- Co-authored-by: louis-md <[email protected]> --------- Co-authored-by: Yago Pérez Vázquez <[email protected]>
Context
This PR adds a new tutorial to the advanced passkeys guides, teaching Safe developers how to work with React Native and Safe contracts, as well as how to add passkeys signers.
As a companion to this tutorial, we are introducing two new repositories: