mirror of
https://github.com/clockworklabs/SpacetimeDB.git
synced 2026-05-15 12:18:01 -04:00
39e7ebbb9a8978eb2bad413a1cd0e2708edef75d
WithCredentials to WithToken (#212)
## Description of Changes `WithCredentials` was designed for our old auth model, where tokens were always issued by the SpacetimeDB host alongside an `Identity`, and therefore the bearer always knew their `Identity`. In our new auth model, a client may have a valid auth-able JWT but not know what `Identity` it will result in, as the `Identity` is computed based on the hash of some of the token's contents, and this hashing algorithm is not included in our client SDKs. As such, this PR revises `WithCredentials` to `WithToken`, which just accepts the token. ## API - [x] This is an API breaking change to the SDK *If the API is breaking, please state below what will break* `WithCredentials` is renamed and its signature changes. ## Requires SpacetimeDB PRs *List any PRs here that are required for this SDK change to work* ## Testsuite *If you would like to run the your SDK changes in this PR against a specific SpacetimeDB branch, specify that here. This can be a branch name or a link to a PR.* SpacetimeDB branch name: master ## Testing *Write instructions for a test that you performed for this PR* - [ ] @cloutiertyler should test this with the Unity tutorial, if possible. --------- Co-authored-by: Zeke Foppa <196249+bfops@users.noreply.github.com>
Description
Multiplayer at the speed of light
261 MiB
Languages
Rust
53.1%
C++
21.7%
TypeScript
14%
C#
7.8%
CSS
1.1%
Other
2%