Actions7
Authentication → Verify ID Token
AI-generatedOverview
This node integrates with the Firebase Admin SDK to perform various authentication-related operations on Firebase users. Specifically, for the Verify ID Token operation, it verifies the validity and integrity of a Firebase ID token issued by Firebase Authentication. This is useful in scenarios where you need to confirm that a user’s ID token is authentic and has not been tampered with, such as validating user sessions or securing API endpoints.
Practical examples include:
- Verifying a user's ID token received from a client app before granting access to protected resources.
- Confirming the identity of a user in backend workflows.
- Ensuring tokens are valid and extracting user information embedded within the token.
Properties
| Name | Meaning |
|---|---|
| ID Token | The Firebase ID token string to verify. This is a JWT token issued by Firebase Auth. |
Output
The output JSON contains the decoded and verified token data returned by Firebase after successful verification. This typically includes fields such as:
uid: The user ID associated with the token.email,email_verified: User's email and its verification status.name,picture: User's display name and profile picture URL.iat,exp: Issued at and expiration timestamps.- Other custom claims included in the token.
If verification fails, an error will be thrown or returned depending on the node’s error handling settings.
No binary data is output by this operation.
Dependencies
- Requires a valid Firebase service account JSON credential to authenticate with Firebase Admin SDK.
- The node depends on the Firebase Admin SDK (
firebase-admin/auth) to perform token verification. - Proper configuration of the Firebase project and enabling Firebase Authentication is necessary.
Troubleshooting
- Invalid service account JSON format: Ensure the provided service account JSON is correctly formatted and complete.
- Failed to initialize Firebase: Check that the service account credentials are valid and have the necessary permissions.
- Invalid ID token: If the token is expired, malformed, or revoked, verification will fail. Make sure the token is freshly obtained from a trusted Firebase client.
- Operation not supported: Occurs if an unsupported operation name is used; verify the operation parameter is set to "verifyIdToken".
- To handle errors gracefully, enable the node’s "Continue On Fail" option to process subsequent items even if one fails.