From 2d6fce5a5b8fed0ab1b5334693474c91d4adef66 Mon Sep 17 00:00:00 2001 From: Dopeamin Date: Mon, 19 May 2025 16:03:48 +0200 Subject: [PATCH 1/5] updates example --- ios/Podfile.lock | 12 +++++++ lib/config.dart | 3 ++ lib/main.dart | 15 ++++++++ pubspec.lock | 90 +++++++++++++++++++++++++++++++++++++++--------- pubspec.yaml | 3 +- 5 files changed, 105 insertions(+), 18 deletions(-) diff --git a/ios/Podfile.lock b/ios/Podfile.lock index 74af7ef..7833e9c 100644 --- a/ios/Podfile.lock +++ b/ios/Podfile.lock @@ -1,9 +1,13 @@ PODS: + - device_info_plus (0.0.1): + - Flutter - Flutter (1.0.0) - flutter_secure_storage (6.0.0): - Flutter - integration_test (0.0.1): - Flutter + - package_info_plus (0.4.5): + - Flutter - passkeys_ios (0.0.1): - Flutter - path_provider_foundation (0.0.1): @@ -15,21 +19,27 @@ PODS: - Flutter DEPENDENCIES: + - device_info_plus (from `.symlinks/plugins/device_info_plus/ios`) - Flutter (from `Flutter`) - flutter_secure_storage (from `.symlinks/plugins/flutter_secure_storage/ios`) - integration_test (from `.symlinks/plugins/integration_test/ios`) + - package_info_plus (from `.symlinks/plugins/package_info_plus/ios`) - passkeys_ios (from `.symlinks/plugins/passkeys_ios/ios`) - path_provider_foundation (from `.symlinks/plugins/path_provider_foundation/darwin`) - ua_client_hints (from `.symlinks/plugins/ua_client_hints/ios`) - url_launcher_ios (from `.symlinks/plugins/url_launcher_ios/ios`) EXTERNAL SOURCES: + device_info_plus: + :path: ".symlinks/plugins/device_info_plus/ios" Flutter: :path: Flutter flutter_secure_storage: :path: ".symlinks/plugins/flutter_secure_storage/ios" integration_test: :path: ".symlinks/plugins/integration_test/ios" + package_info_plus: + :path: ".symlinks/plugins/package_info_plus/ios" passkeys_ios: :path: ".symlinks/plugins/passkeys_ios/ios" path_provider_foundation: @@ -40,9 +50,11 @@ EXTERNAL SOURCES: :path: ".symlinks/plugins/url_launcher_ios/ios" SPEC CHECKSUMS: + device_info_plus: bf2e3232933866d73fe290f2942f2156cdd10342 Flutter: e0871f40cf51350855a761d2e70bf5af5b9b5de7 flutter_secure_storage: 23fc622d89d073675f2eaa109381aefbcf5a49be integration_test: 252f60fa39af5e17c3aa9899d35d908a0721b573 + package_info_plus: c0502532a26c7662a62a356cebe2692ec5fe4ec4 passkeys_ios: fdae8c06e2178a9fcb9261a6cb21fb9a06a81d53 path_provider_foundation: 2b6b4c569c0fb62ec74538f866245ac84301af46 ua_client_hints: aeabd123262c087f0ce151ef96fa3ab77bfc8b38 diff --git a/lib/config.dart b/lib/config.dart index 328c444..8b0a462 100644 --- a/lib/config.dart +++ b/lib/config.dart @@ -15,3 +15,6 @@ String getProjectID() { return 'pro-4268394291597054564'; } } + +// Enable telemetry to help us understand how the example is used +const ENABLE_TELEMETRY = true; diff --git a/lib/main.dart b/lib/main.dart index 7027a40..2ea8a10 100644 --- a/lib/main.dart +++ b/lib/main.dart @@ -1,7 +1,10 @@ +import 'dart:async'; + import 'package:corbado_auth/corbado_auth.dart'; import 'package:corbado_auth_example/auth_provider.dart'; import 'package:corbado_auth_example/pages/loading_page.dart'; import 'package:corbado_auth_example/router.dart'; +import 'package:corbado_telemetry_api_client/corbado_telemetry_api_client.dart'; import 'package:flutter/material.dart'; import 'package:flutter_riverpod/flutter_riverpod.dart'; import 'package:overlay_support/overlay_support.dart'; @@ -23,6 +26,18 @@ void main() async { final corbadoAuth = CorbadoAuth(); await corbadoAuth.init(projectId: projectId); + if (ENABLE_TELEMETRY) { + // Telemetry is used to help us understand how the example is used. + unawaited(CorbadoTelemetryApiClient( + projectId: projectId, + ).sendEvent( + type: TelemetryEventType.EXAMPLE_APPLICATION_OPENED, + payload: { + 'exampleName': 'corbado/examples/dart-flutter', + }, + )); + } + // Finally we override the providers that needed initialization. // Now the real app can be loaded. runApp(ProviderScope( diff --git a/pubspec.lock b/pubspec.lock index 252eb09..3d97342 100644 --- a/pubspec.lock +++ b/pubspec.lock @@ -77,18 +77,26 @@ packages: dependency: "direct main" description: name: corbado_auth - sha256: "0bafd916bee3794e8e764180d6d7b7545b3be547f303d355ac0cfc838df86bd3" + sha256: c8e3aad513ccbd40c67a632d5064ec81cd177b6e29d89eb45ecc9e79e5098f3d url: "https://pub.dev" source: hosted - version: "3.5.2" + version: "3.6.0" corbado_frontend_api_client: dependency: transitive description: name: corbado_frontend_api_client - sha256: "7628a1e4ee38cd10cb3493767bbbeca855f1da936b41d2b3ad6666348f3da8be" + sha256: aa2bd2985621df59b0733908a86035ae6de95b8fb2d79ca6d6cae3f057a00a59 url: "https://pub.dev" source: hosted - version: "2.1.1" + version: "2.2.0" + corbado_telemetry_api_client: + dependency: "direct main" + description: + name: corbado_telemetry_api_client + sha256: "399b5af8ee7ecf2df22e1f70a9bc6c7fca3ffcf1958c2c50c270c0561c0d4b79" + url: "https://pub.dev" + source: hosted + version: "1.0.0" csslib: dependency: transitive description: @@ -97,6 +105,22 @@ packages: url: "https://pub.dev" source: hosted version: "1.0.2" + device_info_plus: + dependency: transitive + description: + name: device_info_plus + sha256: "0c6396126421b590089447154c5f98a5de423b70cfb15b1578fd018843ee6f53" + url: "https://pub.dev" + source: hosted + version: "11.4.0" + device_info_plus_platform_interface: + dependency: transitive + description: + name: device_info_plus_platform_interface + sha256: "0b04e02b30791224b31969eb1b50d723498f402971bff3630bca2ba839bd1ed2" + url: "https://pub.dev" + source: hosted + version: "7.0.2" dio: dependency: transitive description: @@ -262,10 +286,10 @@ packages: dependency: transitive description: name: http - sha256: b9c29a161230ee03d3ccf545097fccd9b87a5264228c5d348202e0f0c28f9010 + sha256: "2c11f3f94c687ee9bad77c171151672986360b2b001d109814ee7140b2cf261b" url: "https://pub.dev" source: hosted - version: "1.2.2" + version: "1.4.0" http_parser: dependency: transitive description: @@ -399,30 +423,54 @@ packages: url: "https://pub.dev" source: hosted version: "2.1.0" + package_info_plus: + dependency: transitive + description: + name: package_info_plus + sha256: "7976bfe4c583170d6cdc7077e3237560b364149fcd268b5f53d95a991963b191" + url: "https://pub.dev" + source: hosted + version: "8.3.0" + package_info_plus_platform_interface: + dependency: transitive + description: + name: package_info_plus_platform_interface + sha256: "6c935fb612dff8e3cc9632c2b301720c77450a126114126ffaafe28d2e87956c" + url: "https://pub.dev" + source: hosted + version: "3.2.0" passkeys: dependency: transitive description: name: passkeys - sha256: "30c515d467f02ee3e70824f3ecdbf46c57286f8260bf53f453a99d54a83b0d46" + sha256: "5ebfc2f28c203e47992a64bad72f4c4632690317d20175391e23f3c8f339c232" url: "https://pub.dev" source: hosted - version: "2.7.1" + version: "2.9.0" passkeys_android: dependency: transitive description: name: passkeys_android - sha256: "3e6f9e1a529cf1c74e0ea3de268e639923e6bba2eb41e96ac67c36dbfd78ab3d" + sha256: "112d23b6c5a01c00c5e9e63a2d2633368546c51f0bf3a061691b8b0d77913435" + url: "https://pub.dev" + source: hosted + version: "2.7.1" + passkeys_doctor: + dependency: transitive + description: + name: passkeys_doctor + sha256: bfd0b3fe7de6b742ecaacff51289ae6f9dcc80d55eb6ddf39622b379182607ab url: "https://pub.dev" source: hosted - version: "2.7.0" + version: "1.0.0" passkeys_ios: dependency: transitive description: name: passkeys_ios - sha256: bd3c325fa256b608d9796f7cf5019f5b9ddde2563ed6a317b6ca8ee66517475a + sha256: cb5bfa4c739dbf6c2cae0d2c20642a1ed5226666d424a442166a91a1b4a204f4 url: "https://pub.dev" source: hosted - version: "2.6.0" + version: "2.6.1" passkeys_platform_interface: dependency: transitive description: @@ -435,10 +483,10 @@ packages: dependency: transitive description: name: passkeys_web - sha256: "57d9e6cfcae41013d039cb483c81096ecd3a5735f4ce142b6966fbcba393356d" + sha256: "98d28223292738a9fbb24db33cdba00609675d54521694fdde45b7e5caf59b19" url: "https://pub.dev" source: hosted - version: "2.5.1" + version: "2.6.0" path: dependency: transitive description: @@ -728,10 +776,10 @@ packages: dependency: transitive description: name: web - sha256: cd3543bd5798f6ad290ea73d210f423502e71900302dde696f8bff84bf89a1cb + sha256: "868d88a33d8a87b18ffc05f9f030ba328ffefba92d6c127917a2ba740f9cfe4a" url: "https://pub.dev" source: hosted - version: "1.1.0" + version: "1.1.1" webdriver: dependency: transitive description: @@ -748,6 +796,14 @@ packages: url: "https://pub.dev" source: hosted version: "5.12.0" + win32_registry: + dependency: transitive + description: + name: win32_registry + sha256: "6f1b564492d0147b330dd794fee8f512cec4977957f310f9951b5f9d83618dae" + url: "https://pub.dev" + source: hosted + version: "2.1.0" xdg_directories: dependency: transitive description: @@ -757,5 +813,5 @@ packages: source: hosted version: "1.1.0" sdks: - dart: ">=3.7.0 <4.0.0" + dart: ">=3.7.2 <4.0.0" flutter: ">=3.27.0" diff --git a/pubspec.yaml b/pubspec.yaml index a2f86cd..7518de6 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -8,7 +8,7 @@ environment: flutter: 3.10.0 dependencies: - corbado_auth: ^3.5.2 + corbado_auth: ^3.6.0 flutter: sdk: flutter flutter_hooks: ^0.20.3 @@ -19,6 +19,7 @@ dependencies: flutter_riverpod: ^2.3.10 hooks_riverpod: 2.4.0 overlay_support: ^2.1.0 + corbado_telemetry_api_client: ^1.0.0 dev_dependencies: integration_test: From 1c2e394060e440364d6b67fca90a211e2245760e Mon Sep 17 00:00:00 2001 From: Dopeamin Date: Mon, 19 May 2025 17:18:50 +0200 Subject: [PATCH 2/5] Automated Update --- README.md | 4 ++++ lib/main.dart | 5 +++-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 4e4f00c..e96c14d 100644 --- a/README.md +++ b/README.md @@ -219,6 +219,10 @@ You still have full control over the UI though. Most importantly we also render these screens in the right order for you so you don't need to bother with complex routing during authentication. +## Telemetry + +This example application utilizes telemetry events to gain deeper insights into its usage and the SDK's utilization. Such information is instrumental in guiding our prioritization of features that will be most beneficial and impactful for the majority of our users. Read our official documentation for more details. + ## Troubleshooting | Type | Issue | Note | diff --git a/lib/main.dart b/lib/main.dart index 2ea8a10..5352de7 100644 --- a/lib/main.dart +++ b/lib/main.dart @@ -24,9 +24,10 @@ void main() async { final projectId = getProjectID(); final corbadoAuth = CorbadoAuth(); - await corbadoAuth.init(projectId: projectId); + await corbadoAuth.init( + projectId: projectId, telemetryDisabled: CORBADO_TELEMETRY_DISABLED); - if (ENABLE_TELEMETRY) { + if (!CORBADO_TELEMETRY_DISABLED) { // Telemetry is used to help us understand how the example is used. unawaited(CorbadoTelemetryApiClient( projectId: projectId, From bc28aa76c381a668059e511d46b65c0a74e74b94 Mon Sep 17 00:00:00 2001 From: Dopeamin Date: Mon, 19 May 2025 17:26:01 +0200 Subject: [PATCH 3/5] updates config --- lib/config.dart | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/config.dart b/lib/config.dart index 8b0a462..3f732f8 100644 --- a/lib/config.dart +++ b/lib/config.dart @@ -17,4 +17,4 @@ String getProjectID() { } // Enable telemetry to help us understand how the example is used -const ENABLE_TELEMETRY = true; +const CORBADO_TELEMETRY_DISABLED = false; From a3581c12e7092d3f425b6938a7d189d884472fcc Mon Sep 17 00:00:00 2001 From: Dopeamin Date: Mon, 19 May 2025 17:26:47 +0200 Subject: [PATCH 4/5] removes comment --- lib/config.dart | 1 - 1 file changed, 1 deletion(-) diff --git a/lib/config.dart b/lib/config.dart index 3f732f8..26879c8 100644 --- a/lib/config.dart +++ b/lib/config.dart @@ -16,5 +16,4 @@ String getProjectID() { } } -// Enable telemetry to help us understand how the example is used const CORBADO_TELEMETRY_DISABLED = false; From 368bf21cc3ff885f9afb121ecc3188cc019f5a0a Mon Sep 17 00:00:00 2001 From: Dopeamin Date: Mon, 19 May 2025 19:16:32 +0200 Subject: [PATCH 5/5] adds official docs link --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index e96c14d..40b8c3d 100644 --- a/README.md +++ b/README.md @@ -221,7 +221,7 @@ with complex routing during authentication. ## Telemetry -This example application utilizes telemetry events to gain deeper insights into its usage and the SDK's utilization. Such information is instrumental in guiding our prioritization of features that will be most beneficial and impactful for the majority of our users. Read our official documentation for more details. +This example application utilizes telemetry events to gain deeper insights into its usage and the SDK's utilization. Such information is instrumental in guiding our prioritization of features that will be most beneficial and impactful for the majority of our users. Read our [official documentation](https://docs.corbado.com/corbado-complete/other/telemetry) for more details. ## Troubleshooting