diff --git a/installation/authentication-setup/custom.mdx b/installation/authentication-setup/custom.mdx index 71ef9a1a..aa1745ee 100644 --- a/installation/authentication-setup/custom.mdx +++ b/installation/authentication-setup/custom.mdx @@ -24,10 +24,15 @@ and the public key is advertised on a public JWKS URL. Requirements for the key in the JWKS URL: 1. The URL must be a public URL in the [JWKS](https://auth0.com/docs/secure/tokens/json-web-tokens/json-web-key-sets) format. 1. We have an example endpoint available [here](https://hlstmcktecziostiaplz.supabase.co/functions/v1/powersync-jwks); ensure that your response looks similar. -2. Supported signature schemes: RSA and EdDSA. ECDSA is not supported yet. -3. Key type (`kty`): `RSA` or `OKP` (EdDSA). -4. Algorithm (`alg`): `RS256`, `RS384` or `RS512` for RSA, or `EdDSA` for EdDSA. -5. Curve (`crv`): `Ed25519` or `Ed448`, only relevant for EdDSA. +2. Supported signature schemes: RSA, EdDSA and ECDSA. +3. Key type (`kty`): `RSA`, `OKP` (EdDSA) or `EC` (ECDSA). +4. Algorithm (`alg`): + 1. `RS256`, `RS384` or `RS512` for RSA + 2. `EdDSA` for EdDSA + 3. `ES256`, `ES384` or `ES512` for ECDSA +5. Curve (`crv`) - only relevant for EdDSA and ECDSA: + 1. `Ed25519` or `Ed448` for EdDSA + 2. `P-256`, `P-384` or `P-512` for ECDSA 6. A `kid` must be specified, and must match the `kid` in the JWT. Requirements for the signed JWT: diff --git a/usage/sync-rules/advanced-topics/client-parameters.mdx b/usage/sync-rules/advanced-topics/client-parameters.mdx index 40ed7700..1c9c4e51 100644 --- a/usage/sync-rules/advanced-topics/client-parameters.mdx +++ b/usage/sync-rules/advanced-topics/client-parameters.mdx @@ -1,12 +1,8 @@ --- -title: "Client Parameters (Beta)" +title: "Client Parameters" description: "Pass parameters from the client directly for use in Sync Rules." --- - -This feature is currently in a beta release. It is suitable for production use if you have tested your use cases extensively. - - Use client parameters with caution. Please make sure to read the [Security consideration](#security-consideration) section below. diff --git a/usage/sync-rules/operators-and-functions.mdx b/usage/sync-rules/operators-and-functions.mdx index 147e55cb..8921c33e 100644 --- a/usage/sync-rules/operators-and-functions.mdx +++ b/usage/sync-rules/operators-and-functions.mdx @@ -45,6 +45,7 @@ Some fundamental restrictions on these operators and functions are: | [json\_valid(data)](https://www.sqlite.org/json1.html#jvalid) | Returns 1 if the data can be parsed as JSON, 0 otherwise. | | json\_keys(data) | Returns the set of keys of a JSON object as a JSON array. Example: `select * from items where bucket.user_id in json_keys(permissions_json)` | | [ifnull(x,y)](https://www.sqlite.org/lang_corefunc.html#ifnull) | Returns x if non-null, otherwise returns y. | +| [iif(x,y,z)](https://www.sqlite.org/lang_corefunc.html#iif) | Returns y if x is true, otherwise returns z. | | [uuid_blob(id)](https://sqlite.org/src/file/ext/misc/uuid.c) | Convert a UUID string to bytes. | | [unixepoch(datetime, \[modifier\])](https://www.sqlite.org/lang_datefunc.html) | Returns a datetime as Unix timestamp. If modifier is "subsec", the result is a floating point number, with milliseconds including in the fraction. The datetime argument is required - this function cannot be used to get the current time. | | [datetime(datetime, \[modifier\])](https://www.sqlite.org/lang_datefunc.html) | Returns a datetime as a datetime string, in the format YYYY-MM-DD HH:MM:SS. If the specifier is "subsec", milliseconds are also included. If the modifier is "unixepoch", the argument is interpreted as a unix timestamp. Both modifiers can be included: datetime(timestamp, 'unixepoch', 'subsec'). The datetime argument is required - this function cannot be used to get the current time. | diff --git a/usage/sync-rules/parameter-queries.mdx b/usage/sync-rules/parameter-queries.mdx index cdaceb89..303e754c 100644 --- a/usage/sync-rules/parameter-queries.mdx +++ b/usage/sync-rules/parameter-queries.mdx @@ -188,6 +188,10 @@ bucket_definitions: Keep in mind that the total number of buckets per user should remain limited (\< 1,000), so don't make buckets too granular. +#### Pass parameters from clients + +It is possible to pass parameters from clients directly. See [client parameters](/usage/sync-rules/advanced-topics/client-parameters) to learn more. + #### Global buckets Global buckets are buckets with no bucket parameters. This means there is a single bucket for the bucket definition.