Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

feat(appcheck): add helpful log for registering debug tokens#16232

Merged
ncooke3 merged 3 commits into
mainfirebase/firebase-ios-sdk:mainfrom
nc/debug-help-logfirebase/firebase-ios-sdk:nc/debug-help-logCopy head branch name to clipboard
Jun 5, 2026
Merged

feat(appcheck): add helpful log for registering debug tokens#16232
ncooke3 merged 3 commits into
mainfirebase/firebase-ios-sdk:mainfrom
nc/debug-help-logfirebase/firebase-ios-sdk:nc/debug-help-logCopy head branch name to clipboard

Conversation

@ncooke3

@ncooke3 ncooke3 commented Jun 4, 2026

Copy link
Copy Markdown
Member

If the debug provider fails to return a valid FAC token, assume the token is unregistered. To assist developers, log a direct link to the Firebase console where they can register the debug token printed at app startup.

As currently implemented, the project ID and app ID will be printed to the console (interpolated into the URL).

Precedent on logging these fields

Example (on attesting with unregistered debug token):

<Debug> [AppCheckCore][I-GAC004004] Failed to exchange debug token to app check token: Error Domain=com.google.app_check_core Code=0 "The server responded with an error: 
 - URL: https://firebaseappcheck.googleapis.com/v1/projects/appcheck-testing/apps/<redacted>:exchangeDebugToken 
 - HTTP status code: 403 
 - Response body: {
  "error": {
    "code": 403,
    "message": "App attestation failed.",
    "status": "PERMISSION_DENIED"
  }
}
" UserInfo={NSLocalizedFailureReason=The server responded with an error: 
 - URL: https://firebaseappcheck.googleapis.com/v1/projects/appcheck-testing/apps//<redacted>:exchangeDebugToken 
 - HTTP status code: 403 
 - Response body: {
  "error": {
    "code": 403,
    "message": "App attestation failed.",
    "status": "PERMISSION_DENIED"
  }
}
}
12.15.0 - [FirebaseAppCheck][I-FAA004002] Failed to exchange debug token. If you haven't registered it, you can do so in the Firebase Console: https://firebase.google.com/project/appcheck-testing/appcheck/apps?selectedAppId=<redacted>

The last line from above is from the new log:

12.15.0 - [FirebaseAppCheck][I-FAA004002] Failed to exchange debug token.
If you haven't registered it, you can do so in the Firebase Console:
https://firebase.google.com/project/appcheck-testing/appcheck/apps?selectedAppId=<redacted>

Verified it takes you to the debug token manager for the given app ID.

Tangential docs: cl/923512169

cc: @weixifan @andrewheard @rlazo

@gemini-code-assist

Copy link
Copy Markdown
Contributor
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize the Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counterproductive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for GitHub and other Google products, sign up here.

Comment thread FirebaseAppCheck/Sources/DebugProvider/FIRAppCheckDebugProvider.m Outdated
@ncooke3
ncooke3 requested review from andrewheard and paulb777 June 4, 2026 20:12
@ncooke3

ncooke3 commented Jun 4, 2026

Copy link
Copy Markdown
Member Author

Not putting the debug token itself in this new log message to prevent accidental leaks.

@ncooke3
ncooke3 merged commit ff92250 into main Jun 5, 2026
88 checks passed
@ncooke3
ncooke3 deleted the nc/debug-help-log branch June 5, 2026 00:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

Morty Proxy This is a proxified and sanitized view of the page, visit original site.