- Create a new folder to work in:
- Create a
docker-compose.yml
file with the below contents:
- Create a config volume that contains a
config.yaml
file, this configured the PowerSync Service itself
/config/config.yaml
:
client_auth
sections needs to be completed.
The PowerSync Service can verify JWTs from client applications using either HMAC (HS*) or RSA (RS*) based algorithms. It can also obtain the necessary settings from Supabase automatically if you are using it.
- In the case of Supabase, simply set the
supabase
key totrue
- In the case of HS* algorithms, specify the secret as base64 encoded in the
k
field. - In the case of RS* based algorithms, the public key(s) can be specified either by supplying a JWKS URI or hard coding the public key in the config file.
- If using a JWKS URI, we have an example endpoint available here; ensure that your response looks similar.
- If hardcoding, see the syntax below. We also have an example key generator script.