Skip to content

feat: add Microsoft Entra External ID OAuth support #439

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

stephanjohnson
Copy link

This pull request adds support for Microsoft Entra External ID (CIAM) as a new OAuth provider. The main changes include updating configuration files, extending the provider list, implementing the Entra External OAuth handler, and integrating the provider into the playground app.

Microsoft Entra External ID (CIAM) Integration:

  • Added new environment variables for Entra External ID configuration in .env.example to support client ID, tenant, and redirect URL.
  • Extended the runtime OAuth configuration in src/module.ts to include Entra External ID settings such as clientId, tenant, tenantId, scope, and endpoint URLs.
  • Implemented the Entra External OAuth handler in src/runtime/server/lib/oauth/entraexternal.ts, supporting OIDC code flow with PKCE, endpoint construction, state validation, and user info retrieval.
  • Added a new route handler for Entra External authentication in playground/server/routes/auth/entraexternal.get.ts, which sets the user session and redirects on success.
  • Updated the OAuth provider list in src/runtime/types/oauth-config.ts to include 'entraexternal' as a valid provider type.

Playground App Integration:

  • Added Entra External ID as a selectable provider in the playground app UI (playground/app.vue).

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