Skip to content

feat(embedded): add /e/authorize email OTP flow - #1075

Open
pmathew92 wants to merge 11 commits into
v5_developmentfrom
feat/SDK-11336
Open

pmathew92 wants to merge 11 commits into
v5_developmentfrom
feat/SDK-11336

Conversation

@pmathew92

@pmathew92 pmathew92 commented Sep 21, 2026 •

Copy link
Copy Markdown
Member

Summary

  • Adds EmbeddedAuthClient with the full multi-step embedded /e/authorize flow: authorize, identifyEmail, identifyPhone, challengeEmail, verifyOtp
  • Implements the continuation-as-error model — non-terminal steps complete through EmbeddedAuthException carrying a rotated auth_session and nextActions; verifyOtp is the terminal step that yields Credentials
  • Fixes scope omission: authorize() now accepts scope (default "openid profile email offline_access") and optional audience so the token exchange returns an id_token
  • Converts authorizeUrl to a lazy property to avoid recomputing the URL on every step

@coderabbitai

coderabbitai Bot commented Sep 21, 2026 •

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Advanced

Run ID: be35c6ec-a1cb-42bc-82de-520b22f5ae89

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@pmathew92
pmathew92 changed the base branch from v5_development to SDK-11058 September 21, 2026 10:31
@pmathew92
pmathew92 added this pull request to stack #1076 September 21, 2026 15:32
@pmathew92
pmathew92 marked this pull request as ready for review September 22, 2026 04:45
@pmathew92
pmathew92 requested a review from a team as a code owner September 22, 2026 04:45
@pmathew92 pmathew92 changed the title feat(embedded): add /e/authorize email OTP flow with sample app feat(embedded): add /e/authorize email OTP flow Sep 22, 2026
Base automatically changed from SDK-11058 to v5_development September 24, 2026 08:23
private val clientId: String
get() = auth0.clientId

private var transactionState: EmbeddedAuthState? = null

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.

we are capturing transactionState here. Can we not add authSession in the function signature itself for client to send it. We do send auth session in EmbeddedAuthException right?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

No . This is intentional. Please re check the design doc. SDK is expected to handle the auth_session within it and not expose it to the calling clients

This branch has not been deployed

No deployments
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.

2 participants