Skip to content

[firebase-appcheck-debug] Print debug token on every provider initialization instead of only when generated #8413

Description

@rlazo

Environment

  • Firebase Component: App Check Debug (firebase-appcheck-debug)

Problem Description

Currently, DebugAppCheckProvider logs the debug secret (Log.d(TAG, "Enter this debug secret into the allow list in the Firebase Console for your project: ...")) when generating a new debug secret during initialization.

This behavior has two major drawbacks:

  1. Not printed on subsequent initializations: If the secret was already generated on a previous run, or if logcat was cleared, subsequent app initializations / runs do not print the debug secret if it was only logged during the single initial generation event or if custom secret providers are used.
  2. Custom Secret Providers: When an InternalDebugSecretProvider is configured, determineDebugSecret() is skipped entirely, meaning the debug token is never printed to logcat upon initialization.

Proposed Solution

Update DebugAppCheckProvider so that every time the provider is initialized (including when an existing token is loaded from storage or provided via InternalDebugSecretProvider), the debug secret is printed to logcat.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions