Our Personal Data Server from scratch! tranquil.farm
oauth atproto pds rust postgresql objectstorage fun

Frontend type-safety improvements #6

merged opened by lewis.moe targeting main from fix/frontend-type-safety-improvements

It should be impossible to call authenticated endpoints in unauthed contexts, ya know?

Labels

None yet.

assignee
Participants 1
Referenced by
AT URI
at://did:plc:3fwecdnvtcscjnrx2p4n7alz/sh.tangled.repo.pull/3mddxypxq5f22
+4
Interdiff #0 #1
frontend/deno.lock

This file has not been changed.

frontend/src/components/AuthenticatedRoute.svelte

This file has not been changed.

frontend/src/lib/api.ts

This file has not been changed.

frontend/src/lib/auth.svelte.ts

This file has not been changed.

frontend/src/lib/authenticated-client.ts

This file has not been changed.

frontend/src/lib/migration/atproto-client.ts

This file has not been changed.

frontend/src/lib/migration/flow.svelte.ts

This file has not been changed.

frontend/src/lib/router.svelte.ts

This file has not been changed.

frontend/src/lib/types/api.ts

This file has not been changed.

frontend/src/lib/types/branded.ts

This file has not been changed.

frontend/src/lib/types/totp-state.ts

This file has not been changed.

frontend/src/routes/ActAs.svelte

This file has not been changed.

frontend/src/routes/Controllers.svelte

This file has not been changed.

frontend/src/routes/Dashboard.svelte

This file has not been changed.

frontend/src/routes/DelegationAudit.svelte

This file has not been changed.

frontend/src/routes/Security.svelte

This file has not been changed.

frontend/src/routes/Settings.svelte

This file has not been changed.

frontend/src/styles/base.css

This file has not been changed.

frontend/src/tests/AppPasswords.test.ts

This file has not been changed.

frontend/src/tests/Login.test.ts

This file has not been changed.

frontend/src/tests/mocks.ts

This file has not been changed.

frontend/src/tests/oauth-registration.test.ts

This file has not been changed.

+4
crates/tranquil-pds/src/api/server/service_auth.rs
··· 113 113 ) 114 114 .into_response(); 115 115 } 116 + Err(crate::oauth::OAuthError::ExpiredToken(msg)) => { 117 + warn!(error = %msg, "getServiceAuth DPoP token expired"); 118 + return ApiError::OAuthExpiredToken(Some(msg)).into_response(); 119 + } 116 120 Err(e) => { 117 121 warn!(error = ?e, "getServiceAuth DPoP auth validation failed"); 118 122 return ApiError::AuthenticationFailed(Some(format!("{:?}", e))).into_response();

History

2 rounds 0 comments
sign up or login to add to the discussion
lewis.moe submitted #1
1 commit
expand
fix: make frontend more type-safe
expand 0 comments
pull request successfully merged
lewis.moe submitted #0
1 commit
expand
fix: make frontend more type-safe
expand 0 comments