Skip to content

feat(auth): add enchanted link provider, template, SSO app and recovery options - #451

Open
yosiharan wants to merge 2 commits into
mainfrom
sdk-update/v1-auth-enchantedlink-20261120-121907
Open

yosiharan wants to merge 2 commits into
mainfrom
sdk-update/v1-auth-enchantedlink-20261120-121907

Conversation

@yosiharan

Copy link
Copy Markdown
Contributor

Related Issues

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

Description

Enchanted link sign-in, sign-up, verify and user update calls can now choose the delivery provider, message template, SSO app, recovery address and locale, and the session response returns the full user and token details the server sends.

Shared code:

  • The magic link request models (SignInRequest, SignUpRequest, UpdateEmailRequest, UpdatePhoneRequest, VerifyRequest) gained nullable fields; magic link never sets them and nulls are not serialized, so its request bodies are unchanged.
  • JWTResponse, AuthenticationInfo (filled by the shared AuthenticationsBase.getAuthenticationInfo), UserResponse and IDPResponse gained fields, additive only, so every auth method now gets them when the server sends them.
  • UserResponse.oAuth also reads the server's OAuth key via @JsonAlias; the oauth key is still read and serialization is unchanged.

Backwards compatibility:

  • Existing EnchantedLinkService methods are kept and delegate to the new overloads with null for the new arguments.
  • All changed models keep their previous all-args constructors (japicmp reports no binary incompatibility).

Interface and enum additions: EnchantedLinkService gains overloads of signIn, signInWithPhone, signUp, signUpWithPhone, signUpOrIn, signUpOrInWithPhone, updateUserEmail, updateUserPhone and verify(token, pkceVerifier); no enum changes.

In a Nutshell

  • POST /v1/auth/enchantedlink/signin/email -> signIn (providerId, ssoAppId, useRecovery)
  • POST /v1/auth/enchantedlink/signin/sms -> signInWithPhone (providerId, ssoAppId, useRecovery)
  • POST /v1/auth/enchantedlink/signup-in/email -> signUpOrIn (providerId, ssoAppId, useRecovery)
  • POST /v1/auth/enchantedlink/signup-in/sms -> signUpOrInWithPhone (providerId, ssoAppId, useRecovery)
  • POST /v1/auth/enchantedlink/signup/email -> signUp (providerId, templateId)
  • POST /v1/auth/enchantedlink/signup/sms -> signUpWithPhone (providerId, templateId)
  • POST /v1/auth/enchantedlink/update/email -> updateUserEmail (providerId, templateId, locale, failOnConflict)
  • POST /v1/auth/enchantedlink/update/phone/sms -> updateUserPhone (providerId, templateId, locale, failOnConflict)
  • POST /v1/auth/enchantedlink/verify -> verify (pkceVerifier)
  • POST /v1/auth/enchantedlink/pending-session -> getSession (new JWT, user and IDP response fields)

Must

  • Tests
  • Documentation (if applicable)

Generated by Descope SDK Agent 🤖🌟

@shuni-bot

shuni-bot Bot commented Nov 20, 2026 •

Copy link
Copy Markdown
Contributor

🐕 Shuni Review

No new issues found.

Approval outcome: APPROVED
Reason: Cumulative full review completed across trusted review history with no findings and clear review threads.

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


Review scope: Partial incremental re-review

Reviewed new changes (4)
  • src/main/java/com/descope/model/auth/AuthenticationInfo.java
  • src/main/java/com/descope/sdk/auth/impl/AuthenticationsBase.java
  • src/main/java/com/descope/sdk/mgmt/impl/JwtServiceImpl.java
  • src/test/java/com/descope/model/auth/AuthenticationInfoTest.java
Previously reviewed and unchanged: 13 files.

🐕 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: 1 inline finding. Every changed file in this pull request was reviewed.

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

@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.

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