Skip to content

Conversation

@2witstudios
Copy link
Owner

Summary

  • Add Firebase SDK integration for push notifications
  • Create zero-trust secure storage plugin (PageSpaceSecureStoragePlugin) with AES-256-GCM encryption
  • Update Gradle plugin to 8.9.1 and SDK versions to 36 for compatibility
  • Configure Google OAuth client ID for social login

Security

The secure storage plugin uses:

  • AES-256-GCM encryption for values
  • AES-256-SIV encryption for keys
  • Android Keystore-backed master key
  • Hardware security module when available
  • Same JS interface as iOS PageSpaceKeychain plugin

Files Changed

File Change
android/build.gradle Gradle plugin 8.9.1, google-services 4.4.4
android/variables.gradle compileSdk/targetSdk → 36
android/app/build.gradle Firebase BoM, firebase-messaging, security-crypto
PageSpaceSecureStoragePlugin.java New zero-trust secure storage
MainActivity.java Register secure storage plugin
capacitor.config.ts Google OAuth client ID
google-services.json Firebase project config

Test plan

  • ./gradlew assembleDebug passes
  • App launches on emulator/device
  • Google Sign-In completes OAuth flow
  • Tokens persist across app restarts
  • Push notification received from Firebase Console

🤖 Generated with Claude Code

- Add Firebase SDK (BoM 34.8.0, firebase-messaging) for push notifications
- Create PageSpaceSecureStoragePlugin with AES-256-GCM encrypted storage
- Register secure storage plugin in MainActivity
- Update Gradle plugin to 8.9.1 and compileSdk/targetSdk to 36
- Update google-services plugin to 4.4.4
- Add google-services.json for Firebase project
- Configure Google OAuth client ID in capacitor.config.ts

Security: Uses Android Keystore-backed master key with hardware security
module when available. Same JS interface as iOS PageSpaceKeychainPlugin.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Copy link

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: bfdd9c6bb4

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment on lines 44 to 48
} catch (Exception e) {
// Fallback to regular SharedPreferences if encryption fails
// This should rarely happen but prevents app crashes
sharedPreferences = getContext()
.getSharedPreferences(PREFS_NAME, Context.MODE_PRIVATE);

Choose a reason for hiding this comment

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

P1 Badge Avoid silently falling back to plaintext storage

When EncryptedSharedPreferences.create(...) throws (e.g., keystore corruption, device policy restrictions, or missing secure hardware), the plugin silently swaps to regular SharedPreferences. In that scenario, callers still use PageSpaceKeychain and will store tokens/credentials unencrypted without any error signal, which defeats the “secure storage” contract and can leak sensitive data on affected devices. Consider rejecting plugin calls or surfacing an initialization error instead of silently persisting plaintext.

Useful? React with 👍 / 👎.

Instead of silently falling back to unencrypted SharedPreferences when
EncryptedSharedPreferences fails to initialize (keystore corruption,
device policy, missing secure hardware), now explicitly reject all
plugin calls with an error message.

This prevents silent plaintext credential storage that would defeat
the zero-trust security contract.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@coderabbitai
Copy link
Contributor

coderabbitai bot commented Feb 2, 2026

Warning

Rate limit exceeded

@2witstudios has exceeded the limit for the number of commits that can be reviewed per hour. Please wait 9 minutes and 5 seconds before requesting another review.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

✨ Finishing touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch android

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@2witstudios 2witstudios merged commit bbd6d6c into master Feb 2, 2026
3 checks passed
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