You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
A genuine 401 with a non-OAuth-shaped body dead-ends into a misleading "check your network" state · oauth-service.ts:64-88 + AuthContext.tsx:416-436
isSessionRejected only treats a 401 as session-rejection when fromOAuthBody is true. If the OAuth server (or a proxy in front of it) returns an expired-session 401 with a body like {message:"Unauthorized"} instead of {error:"invalid_grant"}, the init path takes the non-rejected branch: it keeps the stale refresh token in storage and shows "Unable to reach Forest Admin. Check your network" for what is actually an expired session. The design (avoid false-logout on gateway noise) is sound and well-tested, but the fallback should still clear tokens / offer re-login rather than leave the user with a network-sounding message and a stale token.
exact?: boolean is a three-state value modeled as an optional boolean, re-typed inline in 5 files · forest-service.ts:165,171-180; also deterministic-matcher.ts:18, record-search.ts:10, ForestContext.tsx:37,207, useRelatedRecordsFromAnalysis.ts:15
undefined = "auto-detect strictness from field-name heuristics", true = force Equal, false = force fuzzy — three distinct behaviors, but the signature { exact?: boolean } gives a caller no way to know that omitting the key differs from passing false. You already have the right vocabulary internally (LessonMode = 'strict'|'exact'|'fuzzy'). Recommend a single named MatchStrictness = 'auto'|'exact'|'fuzzy' defined once and imported, instead of the inline object retyped in five places.
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
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.
fixes PRD-866
Problem
OAuth
bff_accesstokens authenticate successfully, but Mode 1 requests fail on agent routes because no downstream agent token is created.Fix
role, permissions, tags, and numericrenderingId.typeandsidclaims.Scope and safety
packages/agent-bff.How to test
yarn workspace @forestadmin/agent-bff test yarn workspace @forestadmin/agent-bff build yarn workspace @forestadmin/agent-bff lintDefinition of Done
General
Security