Skip to content

Conversation

@the-recondite
Copy link

Description

This PR adds the play integrity check to the already present SafetyNet app check when activating firebase app_check. Previously, only the SafetyNetAppCheck was being initialized. This PR was created to fix #9178. We need the play integrity check to make sure the installation of our app is legit.

Related Issues

closes #9178

Checklist

Before you create this PR confirm that it meets all requirements listed below by checking the relevant checkboxes ([x]).
This will ensure a smooth and quick review process. Updating the pubspec.yaml and changelogs is not required.

  • I read the Contributor Guide and followed the process outlined there for submitting PRs.
  • My PR includes unit or integration tests for all changed/updated/fixed behaviors (See Contributor Guide).
  • All existing and new tests are passing.
  • I updated/added relevant documentation (doc comments with ///).
  • The analyzer (melos run analyze) does not report any problems on my PR.
  • I read and followed the Flutter Style Guide.
  • I signed the CLA.
  • I am willing to follow up on review comments in a timely manner.

Breaking Change

Does your PR require plugin users to manually update their apps to accommodate your change?

  • Yes, this is a breaking change.
  • No, this is not a breaking change.

the-recondite and others added 2 commits August 31, 2022 11:14
…pcheck

Added play integrity check to added safety net check for appcheck act…
@the-recondite the-recondite reopened this Aug 31, 2022
@russellwheatley russellwheatley added platform: android Issues / PRs which are specifically for Android. type: missing-feature A feature that is supported on the underlying Firebase SDK but has not been exposed to Dart API. plugin: app_check labels Sep 6, 2022
try {
FirebaseAppCheck firebaseAppCheck = getAppCheck(arguments);
firebaseAppCheck.installAppCheckProviderFactory(
SafetyNetAppCheckProviderFactory.getInstance());
Copy link
Contributor

Choose a reason for hiding this comment

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

I feel like SafetyNet should be behind a flag. SafetyNet is eventually being deprecated and the Play Console is warning folks about SafetyNet being present in their APKs and AABs. I think PlayIntegrityAPI should be the default choice and then optionally have a flag that can switch over to safetyNet, but not have both appcheck providers active at the same time since both provide attestation.

@AngryVelociraptor
Copy link

Adding my support for this issue to be resolved, I was confused today when I learned that flutterfire only supports a deprecated API for android app check.
Don't forget to update this page.

@russellwheatley
Copy link
Member

Hey @the-recondite, thanks for the PR. Hope you don't mind, but we favored a different approach: #9646 😄

@firebase firebase locked and limited conversation to collaborators Oct 31, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

platform: android Issues / PRs which are specifically for Android. plugin: app_check type: missing-feature A feature that is supported on the underlying Firebase SDK but has not been exposed to Dart API.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[📚] [firebase_app_check] Play Integrity Support

4 participants