feat(samples/android): native Android login-pkce sample#156
Merged
Conversation
There was a problem hiding this comment.
Pull request overview
Adds a new native Android (Kotlin + Jetpack Compose + AppAuth-Android) login with Authorization Code + PKCE sample and wires it into the repository’s snippet/manifest generation so the mobile login scenario is represented across Android/iOS/React Native.
Changes:
- Introduces
samples/android/login-pkce/including AppAuth-driven login/logout, token expiry handling, and JVM unit tests. - Extends snippet aggregation to support Android Gradle Version Catalogs (
gradle/libs.versions.toml) for library version extraction. - Updates aggregated scenario/framework manifests and snippet outputs to include Android under
mobile_login_pkce.
Reviewed changes
Copilot reviewed 28 out of 30 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| snippets.json | Adds Android snippets for mobile_login_pkce and reorganizes existing mobile snippet block. |
| snippet-manifest.yaml | Adds Android framework metadata and includes Android in mobile_login_pkce scenario frameworks. |
| scripts/extract-snippets.ts | Adds logic to detect Android library versions from Gradle version catalogs (TOML). |
| samples/ios/login-pkce/QuickstartTests/AuthConfigTests.swift | Updates a localhost-with-port issuer test fixture string. |
| samples/android/manifest.yaml | New per-framework manifest defining Android framework + mobile_login_pkce scenario metadata. |
| samples/android/login-pkce/settings.gradle.kts | New Android sample Gradle settings (repos, project name, module include). |
| samples/android/login-pkce/README.md | New Android sample setup/run documentation and behavioral notes. |
| samples/android/login-pkce/local.example.properties | Template for local SecureAuth/CIAM configuration values. |
| samples/android/login-pkce/gradlew.bat | Adds Windows Gradle wrapper script for the Android sample. |
| samples/android/login-pkce/gradlew | Adds POSIX Gradle wrapper script for the Android sample. |
| samples/android/login-pkce/gradle/wrapper/gradle-wrapper.properties | Pins Gradle wrapper distribution for the Android sample. |
| samples/android/login-pkce/gradle/libs.versions.toml | Defines versions and aliases (AGP/Kotlin/Compose/AppAuth/etc.) for the Android sample. |
| samples/android/login-pkce/gradle/gradle-daemon-jvm.properties | Adds Gradle daemon JVM/toolchain configuration for the Android sample. |
| samples/android/login-pkce/gradle.properties | Android/Gradle/Kotlin build settings for the sample. |
| samples/android/login-pkce/build.gradle.kts | Top-level Gradle plugins configuration using version catalog aliases. |
| samples/android/login-pkce/app/build.gradle.kts | Android app module build config (BuildConfig CIAM fields, Compose, deps, tests). |
| samples/android/login-pkce/app/proguard-rules.pro | Placeholder R8 rules note for AppAuth (minify disabled). |
| samples/android/login-pkce/app/src/main/AndroidManifest.xml | Declares app + AppAuth redirect receiver intent filter with placeholder scheme. |
| samples/android/login-pkce/app/src/main/res/values/strings.xml | Adds app name string resource. |
| samples/android/login-pkce/app/src/main/java/com/secureauth/quickstart/MainActivity.kt | Compose host activity wiring ActivityResult to the ViewModel. |
| samples/android/login-pkce/app/src/main/java/com/secureauth/quickstart/ContentScreen.kt | Compose UI for signed-out/error/signed-in states. |
| samples/android/login-pkce/app/src/main/java/com/secureauth/quickstart/AuthViewModel.kt | AppAuth-based PKCE login, token exchange, logout revocation, expiry scheduling, snippet tags. |
| samples/android/login-pkce/app/src/main/java/com/secureauth/quickstart/AuthExpiry.kt | Helper to evaluate token expiry and compute remaining time. |
| samples/android/login-pkce/app/src/main/java/com/secureauth/quickstart/IDToken.kt | JWT payload decoding for welcome message display claims. |
| samples/android/login-pkce/app/src/test/java/com/secureauth/quickstart/AuthConfigTest.kt | JVM unit tests for issuer URI construction logic. |
| samples/android/login-pkce/app/src/test/java/com/secureauth/quickstart/AuthExpiryTest.kt | JVM unit tests for expiry evaluation behavior. |
| samples/android/login-pkce/app/src/test/java/com/secureauth/quickstart/IDTokenTest.kt | JVM unit tests for JWT payload decoding and welcome-name precedence. |
| README.md | Adds samples/android/ to the repository samples index. |
| .gitignore | Adds Kotlin build cache dir ignore, broadens keystore ignore, and ignores captures. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
bwereszczak
approved these changes
May 12, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
samples/android/login-pkce/, implementing themobile_login_pkcescenario feature-parallel withsamples/ios/login-pkce/andsamples/react-native/login-pkce/.step1–step3mirror the React Native / iOS samples so dashboard step tabs line up.extract-snippets.tsextended to read the AppAuth version fromgradle/libs.versions.tomlfor the aggregated manifest.🤖 Generated with Claude Code