Skip to content

Added OAuth Authentication Method#72

Merged
gaokevin1 merged 17 commits into
mainfrom
some-changes
Nov 12, 2025
Merged

Added OAuth Authentication Method#72
gaokevin1 merged 17 commits into
mainfrom
some-changes

Conversation

@gaokevin1

Copy link
Copy Markdown
Member

Related Issues

Fixes https://github.com/descope/etc/issues/12700
Fixes https://github.com/descope/etc/issues/12701

Related PRs

branch PR
service a PR Link to PR
service b PR Link to PR

Description

Added OAuth authentication method and SDK API headers for better analytics.

Must

  • Tests
  • Documentation (if applicable)

Copilot AI review requested due to automatic review settings November 10, 2025 23:43

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

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 adds OAuth authentication support to the Descope PHP SDK and implements SDK identification headers for better analytics tracking.

Key Changes:

  • Implements OAuth authentication flow with start() and exchangeToken() methods
  • Adds SDK version tracking and custom headers (x-descope-sdk-*) to API requests
  • Updates SSO token exchange to use consistent response handling

Reviewed Changes

Copilot reviewed 8 out of 8 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
src/SDK/Auth/OAuth.php New OAuth authentication class with provider validation and token exchange
src/tests/Auth/OAuthTest.php Comprehensive test coverage for OAuth functionality
src/SDK/DescopeSDK.php Integration of OAuth component into main SDK class
src/SDK/EndpointsV1.php Added SDK_VERSION constant for version tracking
src/SDK/Configuration/SDKConfig.php Added SDK headers method and conditional debug logging
src/SDK/API.php Integrated SDK identification headers into API requests
src/SDK/Auth/SSO.php Updated SSO exchange token to match OAuth implementation pattern
.github/workflows/release.yml Automated SDK version constant updates during release process

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

Comment thread src/SDK/Auth/OAuth.php
Comment thread .github/workflows/release.yml
Comment thread src/SDK/Auth/SSO.php
@gaokevin1 gaokevin1 requested a review from anvibanga November 10, 2025 23:48

@anvibanga anvibanga left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

lgtm!

@gaokevin1 gaokevin1 enabled auto-merge (squash) November 12, 2025 16:43
@gaokevin1 gaokevin1 merged commit e07a0ee into main Nov 12, 2025
6 checks passed
@gaokevin1 gaokevin1 deleted the some-changes branch November 12, 2025 16:43
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.

3 participants