Files
SpacetimeDB/examples
Phoebe Goldman bd923299ec Amend withCredentials to withToken (#128)
* Amend `withCredentials` to `withToken`

`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.

* TypeScript puts ? on variables, not types

* Prettier
2025-01-22 17:31:40 -05:00
..