Skip to content

docs: document oauth2_login_request in courier template data#2669

Merged
vinckr merged 2 commits into
masterfrom
courier-oauth2-login-request
Jul 13, 2026
Merged

docs: document oauth2_login_request in courier template data#2669
vinckr merged 2 commits into
masterfrom
courier-oauth2-login-request

Conversation

@hperl

@hperl hperl commented Jul 9, 2026

Copy link
Copy Markdown
Member

Kratos courier templates now receive a scoped oauth2_login_request object (challenge plus the initiating client's client_id, client_name, client_uri, logo_uri, and metadata) when a flow was started through an OAuth2 login challenge. This documents:

  • the OAuth2LoginRequest Go template variable on the custom email templates page, and
  • the oauth2_login_request field in the HTTP courier template_data (including the previously undocumented login_code_valid and registration_code_valid types).

Feature PR: ory-corp/cloud#12776 (ships with the next Kratos release).

🤖 Generated with Claude Code

Kratos now includes a scoped oauth2_login_request object (challenge and the
client's client_id, client_name, client_uri, logo_uri, metadata) in the
login_code_valid, registration_code_valid, verification_code_valid, and
verification_valid template data when the flow was started through an OAuth2
login challenge. Documents the Go template variable and the HTTP courier
template_data field.

See ory-corp/cloud#12776.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Copilot AI review requested due to automatic review settings July 9, 2026 16:08
@hperl hperl self-assigned this Jul 9, 2026

Copilot AI 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.

Pull request overview

Documents newly available OAuth2 login request context passed into Ory Kratos courier templates, so users can brand emails/webhook payloads based on the initiating OAuth2 client.

Changes:

  • Extend the HTTP mail courier template_data docs to include an optional oauth2_login_request object (plus the login_code_valid / registration_code_valid template types).
  • Document the OAuth2LoginRequest Go template variable (and its client fields) for relevant custom email templates.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

File Description
docs/kratos/self-hosted/03_mail-courier-http.mdx Adds oauth2_login_request to documented HTTP courier template_data and includes an example payload.
docs/kratos/emails-sms/05_custom-email-templates.mdx Documents the OAuth2LoginRequest variable for Go email templates with a field reference table and usage example.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread docs/kratos/self-hosted/03_mail-courier-http.mdx

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

Apply Copilot suggestion, then LGTM

@vinckr vinckr enabled auto-merge (squash) July 13, 2026 12:01
@coderabbitai

coderabbitai Bot commented Jul 13, 2026

Copy link
Copy Markdown

Caution

Review failed

An error occurred during the review process. Please try again later.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch courier-oauth2-login-request

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.

@vinckr vinckr merged commit 7982dbe into master Jul 13, 2026
10 checks passed
@vinckr vinckr deleted the courier-oauth2-login-request branch July 13, 2026 12:10
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.

4 participants