Skip to content

feat(auth): support enchanted link over SMS - #370

Open
eliran-descope wants to merge 3 commits into
mainfrom
feature/el-sms-sdks
Open

feat(auth): support enchanted link over SMS#370
eliran-descope wants to merge 3 commits into
mainfrom
feature/el-sms-sdks

Conversation

@eliran-descope

@eliran-descope eliran-descope commented Sep 9, 2026

Copy link
Copy Markdown

Adds Enchanted Link over SMS to descope-java.

  • Four new phone methods on the enchanted link service.
  • SignUpRequest gains a phone field, appended last, with the original 5-arg constructor kept as an overload — no break for existing callers.
  • Additive only.

Part of descope/etc#18315

Adds signInWithPhone, signUpWithPhone (two overloads), signUpOrInWithPhone
and updateUserPhone (two overloads) to EnchantedLinkService, targeting the
four /v1/auth/enchantedlink/**/sms routes.

The SMS routes return the backend's distinct PhoneEnchantedLinkResponse
message, so a new model class carries maskedPhone rather than widening
EnchantedLinkResponse, whose all-args constructor arity stays intact.
@eliran-descope

Copy link
Copy Markdown
Author

@shuni review

@shuni-bot

shuni-bot Bot commented Sep 9, 2026

Copy link
Copy Markdown
Contributor

🐕 Shuni Review

Adds SMS enchanted-link authentication and phone updates while preserving the existing signup-request constructor.

Actionable comments posted: 0 — no new actionable issues verified.

Merge risk: 🟡 Moderate: Shared-helper changes also affect existing email sign-in and signup flows.

🤖 Model: gpt-6-astra


Review scope: Partial review

Reviewed files (6)
  • README.md
  • src/main/java/com/descope/literals/Routes.java
  • src/main/java/com/descope/model/enchantedlink/PhoneEnchantedLinkResponse.java
  • src/main/java/com/descope/model/magiclink/request/SignUpRequest.java
  • src/main/java/com/descope/sdk/auth/EnchantedLinkService.java
  • src/test/java/com/descope/sdk/auth/impl/EnchantedLinkServiceImplTest.java
Deliberately skipped (1)
  • src/main/java/com/descope/sdk/auth/impl/EnchantedLinkServiceImpl.java: Current-head SMS helpers, phone-update token forwarding, shared transport, and session validation were inspected by the orchestrator and trusted workers. Complete email-regression review remains unavailable: the base/head implementation diff elides removed code, and read/artifact recovery failed. The general worker explicitly retained this limitation; this run does not claim complete review of the implementation.

🐕 Review complete — View session on Shuni Portal 🐾

🤖 Model: gpt-6-astra

Comment thread src/main/java/com/descope/model/magiclink/request/SignUpRequest.java Outdated
Moved the new phone field to the end of SignUpRequest and re-added the
original five-argument constructor as an overload delegating with a null
phone. Inserting phone mid-list changed Lombok's generated constructor
arity and parameter order, breaking external callers at compile time and
precompiled ones with NoSuchMethodError.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Tygd97fhsqkojmDTnr1aVj
@eliran-descope

Copy link
Copy Markdown
Author

@shuni review

@eliran-descope
eliran-descope marked this pull request as ready for review September 10, 2026 10:40
@eliran-descope
eliran-descope marked this pull request as draft September 10, 2026 11:04
@eliran-descope
eliran-descope removed the request for review from aviadl September 10, 2026 11:05
The enchanted link intro was widened to mention the phone variants while
still claiming the message carries three links. Over SMS only the correct
link is sent, so the intro now covers email alone and the SMS paragraph
states that there is nothing for the user to choose.
@eliran-descope
eliran-descope marked this pull request as ready for review September 10, 2026 11:46
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