Skip to content

ui#3908 - Add cloudflare turnstile token argument to trust endpoint#438

Merged
lucy-meachem merged 1 commit into
masterfrom
ui#3908
Jun 15, 2026
Merged

ui#3908 - Add cloudflare turnstile token argument to trust endpoint#438
lucy-meachem merged 1 commit into
masterfrom
ui#3908

Conversation

@lucy-meachem

Copy link
Copy Markdown
Contributor

No description provided.

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

Adds support for passing a Cloudflare Turnstile token when calling the auth/trust endpoint by forwarding the token as the cf-turnstile-response request header.

Changes:

  • Updated Auth.trust to accept a Turnstile token and send it via the cf-turnstile-response header.
  • Added a Jest test to verify the token is forwarded as the expected header.

Reviewed changes

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

File Description
Client/Auth/index.ts Extends Auth.trust to accept a token and forward it as a request header.
Client/Auth/trust.test.ts Adds coverage ensuring the cf-turnstile-response header is passed through to post.

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

Comment thread Client/Auth/index.ts
Comment on lines +80 to 84
async trust(turnstileToken: string) {
return await this.connection.post<model.MPayProcessResponse, 400 | 403 | 404 | 500>(`auth/trust`, undefined, undefined, {
"cf-turnstile-response": turnstileToken,
})
}
@lucy-meachem lucy-meachem merged commit 02bf9f7 into master Jun 15, 2026
2 checks passed
@lucy-meachem lucy-meachem deleted the ui#3908 branch June 15, 2026 10:17
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