Skip to content

Commit 4a045b6

Browse files
authored
Merge pull request #49 from passageidentity/PSG-3990
PSG-3990
2 parents ed24a44 + 4c7d04c commit 4a045b6

File tree

66 files changed

+4400
-5
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

66 files changed

+4400
-5
lines changed

.github/workflows/flutter-ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,4 +23,4 @@ jobs:
2323
run: flutter analyze
2424

2525
- name: Run tests
26-
run: flutter test --platform chrome
26+
run: flutter test --platform chrome

analysis_options.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,3 +2,7 @@ include: package:flutter_lints/flutter.yaml
22

33
# Additional information about this file can be found at
44
# https://dart.dev/guides/language/analysis-options
5+
6+
analyzer:
7+
exclude:
8+
- integrationtestapp/**

android/src/main/kotlin/id/passage/passage_flutter/PassageFlutter.kt

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -422,6 +422,13 @@ internal class PassageFlutter(private val activity: Activity, appId: String? = n
422422
}
423423
}
424424

425+
fun overrideBasePath(call: MethodCall, result: MethodChannel.Result) {
426+
val path = call.argument<String>("path")
427+
?: return invalidArgumentError(result)
428+
passage.overrideBasePath(path)
429+
result.success(null)
430+
}
431+
425432
// endregion
426433

427434
}

android/src/main/kotlin/id/passage/passage_flutter/PassageFlutterPlugin.kt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,9 @@ class PassageFlutterPlugin: FlutterPlugin, MethodCallHandler, ActivityAware {
4444

4545
when (call.method) {
4646
"initWithAppId" -> {}
47+
"overrideBasePath" -> {
48+
passageFlutter?.overrideBasePath(call, result)
49+
}
4750
"registerWithPasskey" -> passageFlutter?.registerWithPasskey(call, result)
4851
"loginWithPasskey" -> passageFlutter?.loginWithPasskey(call, result)
4952
"deviceSupportsPasskeys" -> passageFlutter?.deviceSupportsPasskeys(result)

integrationtestapp/.gitignore

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
# Miscellaneous
2+
*.class
3+
*.log
4+
*.pyc
5+
*.swp
6+
.DS_Store
7+
.atom/
8+
.buildlog/
9+
.history
10+
.svn/
11+
migrate_working_dir/
12+
13+
# IntelliJ related
14+
*.iml
15+
*.ipr
16+
*.iws
17+
.idea/
18+
19+
# The .vscode folder contains launch configuration and tasks you configure in
20+
# VS Code which you may wish to be included in version control, so this line
21+
# is commented out by default.
22+
#.vscode/
23+
24+
# Flutter/Dart/Pub related
25+
**/doc/api/
26+
**/ios/Flutter/.last_build_id
27+
.dart_tool/
28+
.flutter-plugins
29+
.flutter-plugins-dependencies
30+
.pub-cache/
31+
.pub/
32+
/build/
33+
34+
# Symbolication related
35+
app.*.symbols
36+
37+
# Obfuscation related
38+
app.*.map.json
39+
40+
# Android Studio will place build artifacts here
41+
/android/app/debug
42+
/android/app/profile
43+
/android/app/release
44+
45+
# Node.js related
46+
proxy-server/node_modules/

integrationtestapp/.metadata

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
# This file tracks properties of this Flutter project.
2+
# Used by Flutter tool to assess capabilities and perform upgrades etc.
3+
#
4+
# This file should be version controlled and should not be manually edited.
5+
6+
version:
7+
revision: "a14f74ff3a1cbd521163c5f03d68113d50af93d3"
8+
channel: "stable"
9+
10+
project_type: app
11+
12+
# Tracks metadata for the flutter migrate command
13+
migration:
14+
platforms:
15+
- platform: root
16+
create_revision: a14f74ff3a1cbd521163c5f03d68113d50af93d3
17+
base_revision: a14f74ff3a1cbd521163c5f03d68113d50af93d3
18+
- platform: android
19+
create_revision: a14f74ff3a1cbd521163c5f03d68113d50af93d3
20+
base_revision: a14f74ff3a1cbd521163c5f03d68113d50af93d3
21+
- platform: ios
22+
create_revision: a14f74ff3a1cbd521163c5f03d68113d50af93d3
23+
base_revision: a14f74ff3a1cbd521163c5f03d68113d50af93d3
24+
- platform: web
25+
create_revision: a14f74ff3a1cbd521163c5f03d68113d50af93d3
26+
base_revision: a14f74ff3a1cbd521163c5f03d68113d50af93d3
27+
28+
# User provided section
29+
30+
# List of Local paths (relative to this file) that should be
31+
# ignored by the migrate tool.
32+
#
33+
# Files that are not part of the templates will be ignored by default.
34+
unmanaged_files:
35+
- 'lib/main.dart'
36+
- 'ios/Runner.xcodeproj/project.pbxproj'

integrationtestapp/README.md

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
# integration test app
2+
3+
For testing Passage Flutter sdk on web,android and iOS
4+
5+
6+
# Running Tests
7+
8+
# For Web Tests:
9+
Start the ChromeDriver: chromedriver --port=4444
10+
Install Node.js packages: 'npm install' and then start the proxy server: 'node proxy_server.js'
11+
12+
Run the tests with Flutter:
13+
14+
'flutter drive --driver=test_driver/integration_test.dart --target=integration_test/magic_link_test.dart -d chrome --web-port 4200'
15+
16+
17+
# For Android/iOS Tests:
18+
You can run tests directly from VS Code.
19+
Or, you can run the tests from the command line: flutter test integration_test/magic_link_test.dart and then choose your emulator.
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
include: package:flutter_lints/flutter.yaml

integrationtestapp/android/.gitignore

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
gradle-wrapper.jar
2+
/.gradle
3+
/captures/
4+
/gradlew
5+
/gradlew.bat
6+
/local.properties
7+
GeneratedPluginRegistrant.java
8+
9+
# Remember to never publicly share your keystore.
10+
# See https://flutter.dev/docs/deployment/android#reference-the-keystore-from-the-app
11+
key.properties
12+
**/*.keystore
13+
**/*.jks
Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
plugins {
2+
id "com.android.application"
3+
id "kotlin-android"
4+
// The Flutter Gradle Plugin must be applied after the Android and Kotlin Gradle plugins.
5+
id "dev.flutter.flutter-gradle-plugin"
6+
}
7+
8+
def localProperties = new Properties()
9+
def localPropertiesFile = rootProject.file("local.properties")
10+
if (localPropertiesFile.exists()) {
11+
localPropertiesFile.withReader("UTF-8") { reader ->
12+
localProperties.load(reader)
13+
}
14+
}
15+
16+
def flutterVersionCode = localProperties.getProperty("flutter.versionCode")
17+
if (flutterVersionCode == null) {
18+
flutterVersionCode = "1"
19+
}
20+
21+
def flutterVersionName = localProperties.getProperty("flutter.versionName")
22+
if (flutterVersionName == null) {
23+
flutterVersionName = "1.0"
24+
}
25+
26+
android {
27+
namespace = "com.example.integrationtestapp"
28+
compileSdk = 34
29+
ndkVersion = 34
30+
31+
compileOptions {
32+
sourceCompatibility = JavaVersion.VERSION_1_8
33+
targetCompatibility = JavaVersion.VERSION_1_8
34+
}
35+
36+
defaultConfig {
37+
// TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
38+
applicationId = "com.example.integrationtestapp"
39+
// You can update the following values to match your application needs.
40+
// For more information, see: https://docs.flutter.dev/deployment/android#reviewing-the-gradle-build-configuration.
41+
minSdk = 33
42+
targetSdk = 34
43+
versionCode = flutterVersionCode.toInteger()
44+
versionName = flutterVersionName
45+
}
46+
47+
buildTypes {
48+
release {
49+
// TODO: Add your own signing config for the release build.
50+
// Signing with the debug keys for now, so `flutter run --release` works.
51+
signingConfig = signingConfigs.debug
52+
}
53+
}
54+
}
55+
56+
flutter {
57+
source = "../.."
58+
}

0 commit comments

Comments
 (0)