Authentication Setup
Firebase Auth
Setting up Firebase Authentication with PowerSync
Configure authentication on the PowerSync instance with the following settings:
- JWKS URI: https://www.googleapis.com/service_accounts/v1/jwk/[email protected]
- 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.