Skip to content

Commit

Permalink
docs: add return_to query parameter to OAS Verification Flow for Nati…
Browse files Browse the repository at this point in the history
…ve Apps (#4086)
  • Loading branch information
David-Wobrock authored Oct 3, 2024
1 parent 66afac1 commit b22135f
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 0 deletions.
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
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

0 comments on commit b22135f

Please sign in to comment.