Remove the obsolete OAuth fallback - #107
Merged
Merged
Conversation
The device-auth.ts engine has been unreachable since #15 introduced the acquisition engine: StoreBackend supplies acquisition hooks whenever it supplies OAuth config, PositronBackend forbids the legacy path, and createCredentialProvider always prefers acquisition. No consumer outside ai-lib references the removed symbols. This deletes the last tombstone-on-any-error refresh path instead of documenting around it. Breaking change to the ai-credentials API surface: the OAuthBackendHooks type export and the Backend.oauth field are gone; backends without acquisition hooks simply have no OAuth support.
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.
Applications that authenticate through ai-lib now use one OAuth sign-in and refresh path. The removed fallback was unreachable in current applications, but it retained older error handling that could clear stored tokens after any refresh failure.
Store-backed backends continue to acquire and refresh OAuth credentials through the current flow. Host-owned credential backends still resolve their own credentials; when a backend has no OAuth acquisition support, direct token and sign-in compatibility calls return no token or report that OAuth sign-in is unsupported instead of starting a second controller.
Breaking changes
The library no longer exposes the legacy OAuth backend extension. Any external consumer that provided it must migrate to the current OAuth acquisition hooks; in-repository consumers already use those hooks.