Skip to content

docs: document oauth2_login_request in courier template data#2669

Open
hperl wants to merge 1 commit into
masterfrom
courier-oauth2-login-request
Open

docs: document oauth2_login_request in courier template data#2669
hperl wants to merge 1 commit 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
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