Skip to content

OpenConceptLab/ocl_online#201 | Saved endpoint tokens aren't returned by the API - #130

Merged
snyaggarwal merged 4 commits into
mainfrom
ocl_online#201
Nov 13, 2026
Merged

snyaggarwal merged 4 commits into
mainfrom
ocl_online#201

Conversation

@snyaggarwal

Copy link
Copy Markdown
Contributor

Refs OpenConceptLab/ocl_online#201. Goes with OpenConceptLab/oclapi2#991, which makes map project tokens write-only: the API stores them apart and returns has_token: true in their place.

Changes

  • Custom algorithms: when a token is saved but not entered this session, the token field is required and says why. Changing the URL clears has_token, as the API drops a token whose URL changes.
  • Auto Match and single-row matching stop with a warning naming the algorithm when a custom algorithm's saved token hasn't been entered this session, in place of failing every row with a 401.
  • Lookups: for an OCL API lookup (no URL, a path, or the API's origin), the token field explains that the user's own sign-in is used and a token there isn't saved. For another host, it says a token is saved and must be entered again. Changing the URL clears has_token.
  • Copy project: the copy starts without the original's tokens or has_token.
  • buildConfigSnapshot leaves out every token from the run snapshot.
  • New helpers in tokenScope.js: isOCLAPILookupURL, needsSessionToken, withoutTokens. New strings in en, es, pt-BR and zh.

Not in this PR

  • A lookup on a non-OCL host whose saved token isn't entered this session still fails its requests; only the field hint warns.

Tests

  • npm test: 662 pass, including new tests for the helpers and the snapshot. npm run eslint: clean.
  • Not checked in a running Mapper against oclapi2#991.

🤖 Generated with Claude Code

…: the Mapper reads has_token, asks for a custom algorithm's key each session, and keeps tokens out of copies and run snapshots
@snyaggarwal
snyaggarwal requested a review from paynejd November 12, 2026 06:11
@snyaggarwal snyaggarwal self-assigned this Nov 12, 2026
…ow and goes on, lookup token warning, http(s) URL rule matches the API, saved-token URL kept locally, explicit remove

@snyaggarwal snyaggarwal left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed with OpenConceptLab/oclapi2#991 at the current heads. One UI finding below. I did not run tests or lint locally, per request.

…n URL blur; remove action shown with the auth error
@snyaggarwal
snyaggarwal marked this pull request as ready for review November 12, 2026 08:22

@snyaggarwal snyaggarwal left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Rereviewed with OpenConceptLab/oclapi2#991. The earlier P3 is addressed: URL blur skips unauthenticated verification for a saved token, and the removal action remains visible alongside an authentication error. I found no further actionable findings or nits in this pass. I did not run tests or lint locally, per request.

…etail fetch uses isAbsoluteURL; blank token keeps a saved one; lookup token only to its own origin
@snyaggarwal
snyaggarwal merged commit b001fde into main Nov 13, 2026
2 checks passed
@snyaggarwal
snyaggarwal deleted the ocl_online#201 branch November 13, 2026 05:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant