Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/passageidentity/example-flutter
Example Flutter App with Passage Auth
https://github.com/passageidentity/example-flutter
flutter flutter-apps flutter-demo flutter-examples flutter-web passkeys passkeys-demo
Last synced: about 2 months ago
JSON representation
Example Flutter App with Passage Auth
- Host: GitHub
- URL: https://github.com/passageidentity/example-flutter
- Owner: passageidentity
- Created: 2023-08-07T16:49:01.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2024-05-13T22:40:08.000Z (8 months ago)
- Last Synced: 2024-05-14T06:44:20.775Z (8 months ago)
- Topics: flutter, flutter-apps, flutter-demo, flutter-examples, flutter-web, passkeys, passkeys-demo
- Language: Dart
- Homepage:
- Size: 319 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Example Flutter App with Passage Auth
### 🔑 The easiest way to get passkeys up and running for Flutter
[Passage](https://passage.id/)Â and the [Passage Flutter SDK](https://github.com/passageidentity/passage-flutter) were built to make passkey authentication as fast, simple, and secure as possible. This example application is a great place to start. Before using Passage in your own Flutter app, you can use this example app to:
- Plug in your own Passage app credentials to see passkeys in action
- Learn basic implementation of the Passage Flutter SDKA successful registration flow will look like this:
## Requirements
- Android Studio Electric Eel or newer
- Xcode 14 or newer
- A Passage account and Passage app (you can register for a free account [here](https://passage.id/))
- Completed setup of
- Associated Domains file (iOS) ([view instructions](https://docs.passage.id/mobile/ios/add-passage#step-1-publish-associated-domains-file))
- Asset Links file (Android) ([view instructions](https://docs.passage.id/mobile/android/add-passage#step-1-publish-digital-asset-links-file))
- Key hash registration (Android) ([view instructions](https://docs.passage.id/mobile/android/add-passage#step-2-register-your-android-app-with-passage))## Installation
```sh
flutter pub add passage_flutter
```## Configuration
To get this example Flutter app working with your Passage account/app, you'll need to swap out the placeholder authentication origin with your own. Learn more about Passage auth origins [here](https://docs.passage.id/console-administration/apps#app-core-settings).### iOS
You'll need to replace `YOUR_AUTH_ORIGIN` in the Associated Domains file ([found here](https://github.com/passageidentity/example-flutter/blob/main/ios/Runner/Runner.entitlements)).
```xml
com.apple.developer.associated-domains
webcredentials:YOUR_AUTH_ORIGIN
applinks:YOUR_AUTH_ORIGIN
```
### Android
In the `strings.xml` file ([found here](https://github.com/passageidentity/example-flutter/blob/main/android/app/src/main/res/values/strings.xml)) replace `YOUR_AUTH_ORIGIN` with your app’s auth origin.
```xml
YOUR_APP_ORIGIN
...```
### Web
When you're running the web app locally you'll want to make sure your [Passage app auth origin](https://docs.passage.id/console-administration/apps#app-core-settings) and [Flutter web app port](https://www.kindacode.com/snippet/how-to-run-flutter-web-with-a-custom-port/) are set to the same localhost.
### Final step
Lastly, replace `YOUR_APP_ID` in the `passage_state_container.dart` file [here](https://github.com/passageidentity/example-flutter/blob/main/lib/state/passage_state_container.dart).```dart
_passage = PassageFlutter('YOUR_APP_ID');
```## 🚀 Run the app!
If all of the configuration was setup correctly, you should be able to run this application in the simulator or a real device!