Skip to content

add support for custom oauth scopes #379

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

Merged
merged 4 commits into from
Jun 18, 2025
Merged

add support for custom oauth scopes #379

merged 4 commits into from
Jun 18, 2025

Conversation

stacurry
Copy link
Contributor

Description

  • adds support for the oauth_tokens object in the authenticate API response
  • adds support for the new provider_scopes query parameter

Documentation

Does this require changes to the WorkOS Docs? E.g. the API Reference or code snippets need updates.

[X] Yes

If yes, link a related docs PR and add a docs maintainer as a reviewer. Their approval is required.

Copy link

linear bot commented Jun 17, 2025

Copy link

@greptile-apps greptile-apps bot left a comment

Choose a reason for hiding this comment

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

PR Summary

Added support for OAuth tokens and custom provider scopes in the WorkOS Ruby SDK authentication flow. The implementation includes:

  • Added new OAuthTokens class in lib/workos/oauth_tokens.rb to handle third-party provider OAuth token data
  • Added provider_scopes parameter to authorization_url method in lib/workos/user_management.rb for requesting additional OAuth scopes
  • Extended AuthenticationResponse class in lib/workos/authentication_response.rb to include OAuth token information
  • Added comprehensive test coverage for OAuth tokens and custom scopes, including VCR cassettes for mocked responses

6 files reviewed, 2 comments
Edit PR Review Bot Settings | Greptile

@stacurry stacurry requested a review from a team June 17, 2025 22:55
@stacurry stacurry merged commit f94765f into main Jun 18, 2025
2 checks passed
@stacurry stacurry deleted the auth-4665-oauth-scopes branch June 18, 2025 00:11
@stacurry stacurry mentioned this pull request Jun 23, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants