- Fork
https://github.com/corbado/passkeys
into your own GitHub account. If you already have a fork, and are now installing a development environment on a new machine, make sure you've updated your fork so that you don't use stale configuration options from long ago. - If you haven't configured your machine with an SSH key that's known to github, then follow GitHub's directions to generate an SSH key.
git clone git@github.com:<your_name_here>/flutter-passkeys.git
git remote add upstream git@github.com:corbado/flutter-passkeys.git
(So that you fetch from the main repository, not your clone, when runninggit fetch
et al.)
passkeys uses Melos to manage the project and dependencies.
To install Melos, run the following command from your SSH client:
dart pub global activate melos
Next, at the root of your locally cloned repository bootstrap the projects dependencies:
melos bootstrap
The bootstrap command locally links all dependencies within the project without having to
provide manual dependency_overrides
. This allows all
plugins, examples and tests to build from the local clone project.
You do not need to run
flutter pub get
once bootstrap has been completed.
If you're using fvm you might need to specify the sdk-path:
melos bs --sdk-path=/Users/user/fvm/default/
If you're making changes to native code, you'll need to run the following command to regenerate the platform channels using pigeon
cd packages/passkeys/passkeys_android
dart run pigeon --input pigeons/messages.dart
It works the same for passkeys_ios
cd packages/passkeys/passkeys_ios
dart run pigeon --input pigeons/messages.dart
If you're making changes to the web package, you'll need to run the following command to build the javascript code and import it in to the example
melos build-passkeys-web-javascript
To run the example, we can use the following commands:
For web:
melos run example-passkeys-web
For native:
melos run example-passkeys-native
Using Melos (installed in step 3), any changes made to the plugins locally will also be reflected within all example applications code automatically.
We use GitHub pull requests for contributions. Before starting, please:
- Review the Flutter style guide.
- Check open issues and existing pull requests to avoid duplicating work.
To start working on a patch:
git fetch upstream
git checkout upstream/main -b <name_of_your_branch>
- Hack away!
Once you have made your changes, ensure that it passes the internal analyzer & formatting checks. The following commands can be run locally to highlight any issues before committing your code:
melos run format:check
melos run analyze
Assuming all is successful, commit and push your code:
git commit -a -m "<your informative commit message>"
git push origin <name_of_your_branch>
To send us a pull request:
git pull-request
(if you are using Hub) or go tohttps://github.com/corbado/flutter-passkeys
and click the "Compare & pull request" button
Please make sure all your check-ins have detailed commit messages explaining the patch.
When naming the title of your pull request, please follow the Conventional Commits guide. For example, for a fix to the passkeys android package:
fix(passkeys_android): fixed a bug!
Once your PR is open:
- Ensure all checks and CI pipelines pass (GitHub Actions, etc.).
- Wait for code reviews from maintainers.
- Address any feedback, push changes, and keep your PR updated.
This project uses Melos to handle versioning and publishing. Once changes in main are ready to release:
- Pull the latest main branch locally.
- For the changed packages, update the version in the
pubspec.yaml
file. The version should follow the Semantic Versioning guidelines. - Update the
CHANGELOG.md
file with the new version and a list of changes. The changes should be grouped by package and follow the format of the previous entries. - Dry run publish:
melos publish
- If everything looks good, publish:
melos publish --no-dry-run
If you’d like to improve or add documentation:
- Make the changes in the relevant markdown or Dart doc comments.
- Follow the same process above for creating a branch, committing, and opening a PR.
- If you have any doc-specific questions, open an issue or discussion.
Thank you for investing your time in contributing to Passkeys! We value all community contributions. 🚀