Authentication Setup
Firebase Auth
Configure authentication on the PowerSync instance with the following settings:
- JWKS URI: https://www.googleapis.com/service_accounts/v1/jwk/securetoken@system.gserviceaccount.com
- JWT Audience: Firebase project ID
Firebase signs these tokens using RS256.
PowerSync will periodically refresh the keys using the above JWKS URI, and validate tokens against the configured audience (token aud
value).
The Firebase user UID will be available as request.user_id()
(previously token_parameters.user_id
.). To use a different identifier as the user ID in sync rules (for example user email), use Custom authentication.
Was this page helpful?