Conversation
Deploying with
|
| Status | Name | Latest Commit | Preview URL | Updated (UTC) |
|---|---|---|---|---|
| ✅ Deployment successful! View logs |
synapse-dev | b63ee2f | Commit Preview URL Branch Preview URL |
Feb 24 2026, 01:08 PM |
| const permission = getPermissionFromTypeHash(hash) | ||
| this.expirations[permission] = event.args.expiry | ||
| } | ||
| this.emit('expirationsUpdated', this.#expirations) |
There was a problem hiding this comment.
and if it fails and doesn't even get here?
There was a problem hiding this comment.
What do you mean? it will throw an error. User still gets the connected event if syncExpirations doesnt fail.
| error: CustomEvent<Error> | ||
| } | ||
|
|
||
| export type SessionKeyType = 'Secp256k1' | 'P-256' |
|
This might be a good opportunity to deal with Perhaps:
Not a blocker, but the current session key code gives the impression this is all canonical and a closed set of permissions. But developers should be able to use the registry to do non-FWSS things and having an SDK that makes that easy would be nice. |
|
Will I be able to pass |
Yeah not sure yet, because session keys only works for those 4 mutations (maybe just 3 if delete dataset is gone), some of the other services do other mutations that need the root client. I think for now I'm just adding a new constructor option to pass a session keys and internally use if available and has permission. There's one subtle thing in this design, that I want your opinion. The connect/disconnect are actually optional, they are there if you want realtime tracking of the permissions, if you don't you can just pass whatever expirations you got from login and YOLO the mutations. I will be cleaning up with your comments and finish testing hopefully sps work today. |
Pass to where? I don't think we care in any of the places we use it, so this isn't an internal concern. I think the answer here is to just document how expirations work and for long-lived session key instances advise that the developer should be sure to refresh expiries occasionally to be sure to perform |
to but if you want to track expirations and get events to logout user or something you can. |
aa80d34 to
59913f0
Compare
59913f0 to
20c8483
Compare
Example usage: