Repository navigation
feat: report recovery sessions on /users/me and capped dry runs - #505
Merged
Merged
Conversation
GET /users/me answers recovery: true for a recovery session, read from the session, so a cookie client can tell after a reload. The policy dry run returns capped instead of dropping it. The recovery request schemas now come from @seamless-auth/types 0.33.0. Closes #501
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Closes #501. Updates
@seamless-auth/typesto 0.33.0 (which carries fells-code/seamless-auth-types#113 and #115).GET /users/meanswersrecovery: true whenverifyBearerAuthmarked the request as a recovery session, otherwise false. A cookie client cannot read its access token, so this is how the React SDK learns after a reload to route back to enrollment and to refresh after enrolling. Under types 0.31 the response schema stripped the field, which is why this waited for 0.33.POST /system-config/policy/dry-runreturnscappedinstead of removing it. The admin console (feat: v0.20 console: step-up on every admin write, staged policy page, v0.20 audit events seamless-auth-admin-dashboard#314) can then stop inferring the cap from the counts.src/schemas/accountRecovery.tsre-exports the recovery request, request list, id param and verify response schemas from types, replacing the local copies from feat(recovery): deliver recovery notices through the adapter, and cancel from a session #500. The shapes are the same.account-recovery.md(the/users/meflag) andadmin-operations.md(cappedin the response).Contract: two additive response fields, no route or status changes. React (read
recoveryon hydration) and the dashboard (readcapped) follow in their types bump PRs.Checks:
npm run typecheck,lint,format:checkpass.npm run coverage: 2351 passed, 98.9 / 95.31 / 99.24 / 99.11.