-
Notifications
You must be signed in to change notification settings - Fork 0
fix(phase-5): responder review remediation — callable hardening, E2E decline flow, auth error surfacing #60
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
Merged
Merged
Changes from 10 commits
Commits
Show all changes
16 commits
Select commit
Hold shift + click to select a range
40bf3be
fix(shared-validators): make canonicalPayloadHash async using Web Crypto
claude da99f31
fix(functions): await canonicalPayloadHash in idempotency guard
claude ff0dc23
fix(decline-dispatch): rate limit, safe assignedTo access, conditiona…
claude 8258d1d
test(dispatch-mirror): add declined dispatch integration test path
claude f061b3a
fix(shared-sms-parser): add JS entrypoint for functions emulator comp…
claude 16deb3f
fix(responder-app): surface auth errors and refresh token before call…
claude 5688452
fix(responder-app): App Check emulator token and correct functions re…
claude f717359
fix(responder-app): error handling, auto-advance guard, user-friendly…
claude bb81dc4
test(e2e): add decline smoke test, convert empty stubs to test.skip
claude a7ebf7e
docs: phase 5 responder review findings, remediation plan, and learnings
claude 6a079da
Potential fix for pull request finding 'CodeQL / Unused variable, imp…
Exc1D 3c5b057
Potential fix for pull request finding 'CodeQL / Unused variable, imp…
Exc1D a5cc839
fix: address all PR #60 CodeRabbit review comments
claude c5101f4
fix(ci): untrack src/lib/ dirs, populate complete Camarines Norte gaz…
claude ed25c5a
fix(responder): handle client-side validation errors in getActionErro…
claude b4b5021
fix(rules): regenerate firestore.rules to prevent responder updates
claude File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,19 @@ | ||
| import { onIdTokenChanged, type Auth, type User } from 'firebase/auth' | ||
|
|
||
| export async function awaitFreshAuthToken(auth: Auth): Promise<User | null> { | ||
| const user = auth.currentUser | ||
| if (!user) return null | ||
|
|
||
| const refreshed = new Promise<User | null>((resolve) => { | ||
| const unsubscribe = onIdTokenChanged(auth, (nextUser) => { | ||
| if (nextUser?.uid !== user.uid) { | ||
| return | ||
| } | ||
| unsubscribe() | ||
| resolve(nextUser) | ||
| }) | ||
| }) | ||
|
|
||
| await user.getIdToken(true) | ||
| return refreshed | ||
|
coderabbitai[bot] marked this conversation as resolved.
Outdated
|
||
| } | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.