Skip to content

feat(auth): add OAuth prompt and login hint options and OAuth user update - #447

Closed
yosiharan wants to merge 1 commit into
mainfrom
sdk-update/v1-auth-oauth-20261120-002158
Closed

yosiharan wants to merge 1 commit into
mainfrom
sdk-update/v1-auth-oauth-20261120-002158

Conversation

@yosiharan

Copy link
Copy Markdown
Contributor

Related Issues

Required for:
https://github.com/descope/etc/issues/19999

Description

The OAuth service can now pass prompt, login hint and initiated email when starting an OAuth flow, link an OAuth provider to a logged-in user, and returns the full set of authentication response fields.

Shared code:

  • LoginOptions gains ssoAppId, pkceChallenge and tenantId, omitted when unset, so other auth methods send the same body unless a caller sets them.
  • AuthenticationsBase.getAuthenticationInfo (used by every verify/exchange/refresh method) also copies the new JWTResponse fields; existing fields and JWT validation are unchanged.
  • AssociatedTenant gains permissions and roleIds as read-only, so mgmt request bodies that use it are unchanged.

Backwards compatibility:

  • Existing all-args constructors of LoginOptions, JWTResponse, AuthenticationInfo, IDPResponse and UserResponse are kept as explicit overloads (japicmp reports no changes).
  • Existing start/startSignIn/startSignUp overloads are untouched; the new behavior is only in the new overloads.

Interface and enum additions:

  • OAuthService gains start/startSignIn/startSignUp overloads taking OAuthAuthorizeOptions, and two updateUser overloads.
  • New types: OAuthAuthorizeOptions, enum OAuthPrompt (NONE, LOGIN, CONSENT, SELECT_ACCOUNT), UserFamily.

Also: UserResponse.TOTP/SAML/OAuth now also deserialize from the upper-case keys the API sends (via @JsonAlias), so values that were always null are now filled for auth and mgmt users alike; serialization keys are unchanged.

In a Nutshell

  • POST /v1/auth/oauth/authorize -> OAuthService.start (new overload: OAuthAuthorizeOptions)
  • POST /v1/auth/oauth/authorize/signin -> OAuthService.startSignIn (new overload: OAuthAuthorizeOptions)
  • POST /v1/auth/oauth/authorize/signup -> OAuthService.startSignUp (new overload: OAuthAuthorizeOptions)
  • POST /v1/auth/oauth/authorize/update -> OAuthService.updateUser
  • POST /v1/auth/oauth/exchange -> OAuthService.exchangeToken (AuthenticationInfo gains the new session, cookie and user fields)

Must

  • Tests
  • Documentation (if applicable)

Generated by Descope SDK Agent 🤖🌟

@shuni-bot

shuni-bot Bot commented Nov 19, 2026 •

Copy link
Copy Markdown
Contributor

🐕 Shuni Review

No new issues found.

Approval outcome: APPROVED
Reason: Full review completed with no findings and clear review threads.

🤖 Model: claude-opus-5.5 · Effort: medium


Review scope: Full review

Reviewed files (15)
  • README.md
  • src/main/java/com/descope/enums/OAuthPrompt.java
  • src/main/java/com/descope/literals/Routes.java
  • src/main/java/com/descope/model/auth/AssociatedTenant.java
  • src/main/java/com/descope/model/auth/AuthenticationInfo.java
  • src/main/java/com/descope/model/auth/IDPResponse.java
  • src/main/java/com/descope/model/auth/OAuthAuthorizeOptions.java
  • src/main/java/com/descope/model/jwt/response/JWTResponse.java
  • src/main/java/com/descope/model/magiclink/LoginOptions.java
  • src/main/java/com/descope/model/user/response/UserFamily.java
  • src/main/java/com/descope/model/user/response/UserResponse.java
  • src/main/java/com/descope/sdk/auth/OAuthService.java
  • src/main/java/com/descope/sdk/auth/impl/AuthenticationsBase.java
  • src/main/java/com/descope/sdk/auth/impl/OAuthServiceImpl.java
  • src/test/java/com/descope/sdk/auth/impl/OAuthServiceImplTest.java

🐕 Review complete — View session on Shuni Portal 🐾

🤖 Model: claude-opus-5.5 · Effort: medium

@shuni-bot shuni-bot Bot 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.

🐕 Shuni review: no new findings. Every changed file in this pull request was reviewed.

The full review summary is in Shuni's sticky review comment on this pull request.

@yosiharan

Copy link
Copy Markdown
Contributor Author

[DESCOPE-SDK-AGENT 🤖] Closing: this run is superseded by a fresh SDK agent run with an updated harness.

@yosiharan yosiharan closed this Nov 20, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant