-
Notifications
You must be signed in to change notification settings - Fork 646
Allow to authenticate with a short lived token for websocket #51
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
cloutiertyler
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, just a couple comments!
crates/client-api/src/auth.rs
Outdated
| enum AuthorizationRejectionReason { | ||
| Jwt(JwtErrorKind), | ||
| Header(TypedHeaderRejection), | ||
| Other, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we should probably put the specific error, rather than Other in the future.
| #[cfg(feature = "tracelogging")] | ||
| let router = router.nest("/tracelog", spacetimedb_client_api::routes::tracelog::router()); | ||
|
|
||
| router |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What's the CORS for?
* Allow to authenticate with a short lived token for websocket * Add CORS * Lints * Name errors properly * lint
* Allow to authenticate with a short lived token for websocket * Add CORS * Lints * Name errors properly * lint
* Lint script * modernize: pnpm & prettier (#51) * Push * Push * Run prettier * Prettier stuff * modernize: Remove Husky & pre-commit (#53) * modernize: tsup (#54) * Push * jest * modernize: jest to vitest (#55) * modernize: pnpm workspace (#56) * Monorepo * Readme * Move tsconfig * Fix test * modernize: CRA -> Vite apps (#57) * Quickstart * test app too * Run pnpm * Remove eslint files * Format * modernize: ES2017 classes (#58) * modernize: in-house EventEmitter (#64) * Push * Undo min change * modernize: undici for WebSocket in Node (#59) * Use undici, remove other unneeded dependencies * pnpm install * Bundle everything * Move everything to devDependency * headers object * Bump version to 0.11.0 * Push * Hmm not working still * Add undici to peerDependencies * Measure size * Push * Fix formatting * Working on node!! --------- Co-authored-by: Zeke Foppa <github.com/bfops> Co-authored-by: Zeke Foppa <[email protected]> * modernize: Single output (#68) * modernize: quickstart, move server into client (#69) * Push * Run pnpm install * modernize: Engines field (#70) * modernize: Continuous Releases (#71) * Add pkg.pr.new * Fix directory * modernize: Changesets;provenance (#72) * Push * Push * pnpm install * Any update * modernize: Split lint and test GH actions (#73) * Push * Forgot to rename * We only care about Lint at commit level * modernize: pkg.pr.new compact mode (#75) * modernize: tweak prettier configuration (#74) * docs: Undici as peerDependency * modernize: webpackIgnore undici (#77) * Push * Webpackignore * modernize: Conditional browser build (#79) * Push * Remove webpackIgnore * fix: Remove obsolete comment * modernize: isolatedDeclarations;de-cyclic imports (#81) * Push * Fix test --------- Co-authored-by: Zeke Foppa <[email protected]>
* Lint script * modernize: pnpm & prettier (#51) * Push * Push * Run prettier * Prettier stuff * modernize: Remove Husky & pre-commit (#53) * modernize: tsup (#54) * Push * jest * modernize: jest to vitest (#55) * modernize: pnpm workspace (#56) * Monorepo * Readme * Move tsconfig * Fix test * modernize: CRA -> Vite apps (#57) * Quickstart * test app too * Run pnpm * Remove eslint files * Format * modernize: ES2017 classes (#58) * modernize: in-house EventEmitter (#64) * Push * Undo min change * modernize: undici for WebSocket in Node (#59) * Use undici, remove other unneeded dependencies * pnpm install * Bundle everything * Move everything to devDependency * headers object * Bump version to 0.11.0 * Push * Hmm not working still * Add undici to peerDependencies * Measure size * Push * Fix formatting * Working on node!! --------- Co-authored-by: Zeke Foppa <github.com/bfops> Co-authored-by: Zeke Foppa <[email protected]> * modernize: Single output (#68) * modernize: quickstart, move server into client (#69) * Push * Run pnpm install * modernize: Engines field (#70) * modernize: Continuous Releases (#71) * Add pkg.pr.new * Fix directory * modernize: Changesets;provenance (#72) * Push * Push * pnpm install * Any update * modernize: Split lint and test GH actions (#73) * Push * Forgot to rename * We only care about Lint at commit level * modernize: pkg.pr.new compact mode (#75) * modernize: tweak prettier configuration (#74) * docs: Undici as peerDependency * modernize: webpackIgnore undici (#77) * Push * Webpackignore * modernize: Conditional browser build (#79) * Push * Remove webpackIgnore * fix: Remove obsolete comment * modernize: isolatedDeclarations;de-cyclic imports (#81) * Push * Fix test --------- Co-authored-by: Zeke Foppa <[email protected]>
Description of Changes
API
If the API is breaking, please state below what will break