Skip to content

feat(rtn-passkeys): scaffold native package - 1 #14390

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: feat/rtn-passkeys/main
Choose a base branch
from

Conversation

jjarvisp
Copy link
Member

@jjarvisp jjarvisp commented May 17, 2025

Description of changes

The purpose of this PR is to add new package to contain react native library addition and scaffold turbo module for passkey support.

  • Uses create-react-native-library for initial scaffold; removes or refactors extraneous generated files.
  • Adds rollup configuration and build scripts for @aws-amplify/rtn-passkeys.
  • Adds types and definition for Turbo Module specification.
  • Adds codegen for Turbo Module and subsequent generated native files.
  • Adds example React Native application for tests; configured with minimal testing capacity.

Issue #, if available

Description of how you validated changes

  • manual testing

Checklist

  • PR description included
  • yarn test passes
  • Unit Tests are changed or added
  • Relevant documentation is changed or added (and PR referenced)

Checklist for repo maintainers

  • Verify E2E tests for existing workflows are working as expected or add E2E tests for newly added workflows
  • New source file paths included in this PR have been added to CODEOWNERS, if appropriate

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

@jjarvisp jjarvisp changed the title feat: scaffold rtn-passkeys package feat(rtn-passkeys): scaffold native package May 17, 2025
@jjarvisp jjarvisp changed the title feat(rtn-passkeys): scaffold native package feat(rtn-passkeys): scaffold native package - 1 May 17, 2025
@jjarvisp jjarvisp force-pushed the feat/rtn-passkeys/1-add-new-package branch from c3efbfc to 773f40b Compare May 17, 2025 23:31
@jjarvisp jjarvisp marked this pull request as ready for review May 19, 2025 20:29
@jjarvisp jjarvisp requested a review from a team as a code owner May 19, 2025 20:29
Comment on lines +78 to +85
implementation "androidx.credentials:credentials:1.5.0"
implementation "androidx.credentials:credentials-play-services-auth:1.5.0"

testImplementation "junit:junit:4.13.2"
testImplementation "org.robolectric:robolectric:4.14.1"
testImplementation "io.mockk:mockk:1.14.2"
testImplementation "org.jetbrains.kotlinx:kotlinx-coroutines-core:1.10.2"
testImplementation "org.jetbrains.kotlinx:kotlinx-coroutines-test:1.10.2"
Copy link
Member Author

Choose a reason for hiding this comment

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

These are manual changes required to support webauthn and enable unit testing.

}

dependencies {
classpath "com.android.tools.build:gradle:8.7.3"
Copy link
Member

Choose a reason for hiding this comment

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

Maybe minor but the gradle version seems to be newer than other RTN packages in the repo, which is "8.0.2"

AmplifyRtnPasskeys_kotlinVersion=2.1.20
AmplifyRtnPasskeys_minSdkVersion=24
AmplifyRtnPasskeys_targetSdkVersion=34
AmplifyRtnPasskeys_compileSdkVersion=35
Copy link
Member

Choose a reason for hiding this comment

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

Sanity check, it is OK a newer compile sdk version than other native packages right? Is PassKey feature only supported in 35?

Copy link
Member Author

Choose a reason for hiding this comment

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

It's recommended to use the latest version of SDK when compiling and doesn't necessarily impact your minimum supported version unless you are using APIs that do not exist in previous versions.
Passkey is supported in sdk 28+ and there is validation to detect support in each platform implementation.

Comment on lines +22 to +31
"!ios/build",
"!android/build",
"!android/gradle",
"!android/gradlew",
"!android/gradlew.bat",
"!android/local.properties",
"!**/__tests__",
"!**/__fixtures__",
"!**/__mocks__",
"!**/.*"
Copy link
Member

Choose a reason for hiding this comment

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

Any concerns if we keep these files? I don't think we disabled these directories in other native packages.

Copy link
Member Author

Choose a reason for hiding this comment

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

No concerns. I was just trying to minimize the footprint of the shipped artifact. The build directories are git ignored so they'd automatically be omitted; this just makes it explicit. The gradle files aren't necessary.

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.

2 participants