Skip to content

feat(samples/android): native Android login-pkce sample#156

Merged
ksroda-sa merged 5 commits into
mainfrom
feature/android-login-pkce-sample
May 12, 2026
Merged

feat(samples/android): native Android login-pkce sample#156
ksroda-sa merged 5 commits into
mainfrom
feature/android-login-pkce-sample

Conversation

@ksroda-sa

Copy link
Copy Markdown
Collaborator

Summary

  • Adds the first native Android sample at samples/android/login-pkce/, implementing the mobile_login_pkce scenario feature-parallel with samples/ios/login-pkce/ and samples/react-native/login-pkce/.
  • Stack: Kotlin + Jetpack Compose + AppAuth-Android; project uses a Gradle version catalog with the latest stable libs (AGP 9.x, Kotlin 2.3.x, Compose BOM, AppAuth 0.11.x, Gradle 9.x).
  • Snippet tags step1step3 mirror the React Native / iOS samples so dashboard step tabs line up.
  • 13 JVM unit tests passing: 5 IDToken + 3 AuthExpiry + 5 AuthConfig.
  • extract-snippets.ts extended to read the AppAuth version from gradle/libs.versions.toml for the aggregated manifest.

🤖 Generated with Claude Code

@ksroda-sa ksroda-sa marked this pull request as ready for review May 12, 2026 08:19
@ksroda-sa ksroda-sa requested a review from a team as a code owner May 12, 2026 08:19
Copilot AI review requested due to automatic review settings May 12, 2026 08:19

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Comment thread samples/android/login-pkce/app/src/main/AndroidManifest.xml Outdated
@ksroda-sa ksroda-sa merged commit d097ac0 into main May 12, 2026
3 checks passed
@ksroda-sa ksroda-sa deleted the feature/android-login-pkce-sample branch May 12, 2026 08:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants