Skip to content

disambiguate session provider#27

Merged
heskew merged 3 commits intomainfrom
issue-26
Feb 9, 2026
Merged

disambiguate session provider#27
heskew merged 3 commits intomainfrom
issue-26

Conversation

@heskew
Copy link
Member

@heskew heskew commented Feb 6, 2026

resolves #26

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR resolves #26 by disambiguating the OAuth provider stored on the session when using named provider configurations, separating “provider config key” from “provider type” while preserving backwards compatibility.

Changes:

  • Extend session OAuth metadata to include providerConfigId (config key) and providerType (provider type), while deprecating provider for the config-key meaning.
  • Populate the new session fields during OAuth callback handling and return them from the user-info endpoint.
  • Update middleware to resolve providers by providerConfigId (with fallback to provider) and adjust multi-tenant SSO docs example.

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 5 comments.

File Description
src/types.ts Adds providerConfigId and providerType to OAuthSessionMetadata and deprecates provider for the config-key meaning.
src/lib/handlers.ts Writes the new fields into the session during callback; surfaces them in handleUserInfo.
src/index.ts Uses providerConfigId (fallback to provider) for provider registry lookup and dynamic resolution logging.
docs/multi-tenant-sso.md Updates example to use providerConfigId as the tenant identifier.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@heskew heskew merged commit 1ea0809 into main Feb 9, 2026
4 checks passed
@heskew heskew deleted the issue-26 branch February 9, 2026 20:53
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.

Add providerConfigId to session for named provider configs

2 participants