Errors and Troubleshooting

This section outlines the error handling and troubleshooting options available to you when working with Oracle Backend with Firebase APIs services. Errors may arise during authentication, rule evaluation, metadata resolution, or backend execution. Oracle Backend with Firebase APIs provides structured error responses and diagnostic metadata to assist in debugging.

Topics:

Authentication Error Format

All authentication-related errors are returned in a consistent JSON structure:

{
  "error": "<error message>"
}

These messages help developers identify issues, such as token validation failures, missing fields, or unsupported sign-in providers.

Common Authentication Errors

Error Scenario Cause Resolution
Invalid JWT token Token is expired, malformed, or unverifiable Re-authenticate and obtain a valid token
Missing auth object Request payload lacks required authentication context Ensure auth is included in every request
Unsupported sign-in provider sign_in_provider is not recognized Use a supported provider (For example, google.com)
Missing required token fields Fields like uid, sub, or email are absent Confirm that the token structure matches expected format
Token verification failure Signature cannot be verified using backend crypto packages Check token issuer and signing method
Unauthorized access User lacks permission based on rule Confirm auth.uid and rule logic
Invalid JWT token Token expired or malformed Re-authenticate and obtain a new token