Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs: add return_to query parameter to OAS Verification Flow for Native Apps #4086

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions selfservice/flow/verification/handler.go
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,20 @@ func (h *Handler) NewVerificationFlow(w http.ResponseWriter, r *http.Request, ft
return f, nil
}

// Create Verification Flow Parameters for Native Apps
//
// swagger:parameters createNativeVerificationFlow
//
//nolint:deadcode,unused
//lint:ignore U1000 Used to generate Swagger and OpenAPI definitions
type createNativeVerificationFlow struct {
// A URL contained in the return_to key of the verification flow.
// This piece of data has no effect on the actual logic of the flow and is purely informational.
//
// in: query
David-Wobrock marked this conversation as resolved.
Show resolved Hide resolved
ReturnTo string `json:"return_to"`
}

// swagger:route GET /self-service/verification/api frontend createNativeVerificationFlow
//
// # Create Verification Flow for Native Apps
Expand Down
10 changes: 10 additions & 0 deletions spec/api.json
Original file line number Diff line number Diff line change
Expand Up @@ -7092,6 +7092,16 @@
"get": {
"description": "This endpoint initiates a verification flow for API clients such as mobile devices, smart TVs, and so on.\n\nTo fetch an existing verification flow call `/self-service/verification/flows?flow=\u003cflow_id\u003e`.\n\nYou MUST NOT use this endpoint in client-side (Single Page Apps, ReactJS, AngularJS) nor server-side (Java Server\nPages, NodeJS, PHP, Golang, ...) browser applications. Using this endpoint in these applications will make\nyou vulnerable to a variety of CSRF attacks.\n\nThis endpoint MUST ONLY be used in scenarios such as native mobile apps (React Native, Objective C, Swift, Java, ...).\n\nMore information can be found at [Ory Email and Phone Verification Documentation](https://www.ory.sh/docs/kratos/self-service/flows/verify-email-account-activation).",
"operationId": "createNativeVerificationFlow",
"parameters": [
{
"description": "A URL contained in the return_to key of the verification flow. This piece of data has no effect on the actual logic of the flow and is purely informational.",
"in": "query",
"name": "return_to",
"schema": {
"type": "string"
}
}
],
"responses": {
"200": {
"content": {
Expand Down
Loading