firebase / firebase/firebase-android-sdk

[AppCheck] Expose Play Integrity exceptions to support Play Integrity Remediation

Open
#7,932 0 comments 1 reaction 0 assignees View on GitHub
api: app-check type: feature request
Dominant language
Java
Stars
2.6k
Forks
710
Avg merge
2d 9h
Merged PRs (30d)
31

Description

## What feature would you like to see?
I am using Firebase AppCheck with the `PlayIntegrityAppCheckProvider`. Recently, the Play Integrity API introduced remediation flows (e.g., prompt users to update Google Play Services, to install the app from Google Play if it was sideloaded, or prompting them to update their OS).

To trigger these remediation dialogs, developers must catch the specific Play Integrity exception (like `IntegrityServiceException`) to read the error code and pass it to the remediation API. Currently, Firebase AppCheck catches these underlying Play Integrity exceptions and surfaces a generic `FirebaseException`). The original Play Integrity exception is completely swallowed, making it impossible to read the error code and initiate the remediation flow.

**Request:** Please expose the underlying Play Integrity error information. This could be done by including the original `IntegrityServiceException` as the `cause` of the `FirebaseException`, or by creating a specific subclass (e.g., FirebaseAppCheckPlayIntegrityException) that explicitly contains the Play Integrity error code.

## How would you use it?
When an AppCheck token fails to generate due to a Play Integrity failure (e.g., `APP_NOT_INSTALLED_FROM_PLAY_STORE`), I want to prompt the user with the official Play Integrity remediation dialog so they can resolve the issue themselves. Without access to the underlying exception from the AppCheck provider, my only workaround is to bypass Firebase AppCheck entirely and write a custom provider that calls the Play Integrity API directly. This defeats the convenience of using the official `PlayIntegrityAppCheckProvider`.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.