Skip to content

Commit

Permalink
fix(sdk): add cookie for updateLogoutFlow (#3284)
Browse files Browse the repository at this point in the history
  • Loading branch information
PhakornKiong committed May 24, 2023
1 parent 831fb19 commit 95ed2b9
Show file tree
Hide file tree
Showing 5 changed files with 39 additions and 0 deletions.
8 changes: 8 additions & 0 deletions internal/client-go/api_frontend.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 8 additions & 0 deletions internal/httpclient/api_frontend.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 9 additions & 0 deletions selfservice/flow/logout/handler.go
Expand Up @@ -248,6 +248,15 @@ type updateLogoutFlow struct {
//
// in: query
ReturnTo string `json:"return_to"`

// HTTP Cookies
//
// When using the SDK in a browser app, on the server side you must include the HTTP Cookie Header
// sent by the client to your server here. This ensures that CSRF and session cookies are respected.
//
// in: header
// name: Cookie
Cookies string `json:"Cookie"`
}

// swagger:route GET /self-service/logout frontend updateLogoutFlow
Expand Down
8 changes: 8 additions & 0 deletions spec/api.json
Expand Up @@ -5035,6 +5035,14 @@
"schema": {
"type": "string"
}
},
{
"description": "HTTP Cookies\n\nWhen using the SDK in a browser app, on the server side you must include the HTTP Cookie Header\nsent by the client to your server here. This ensures that CSRF and session cookies are respected.",
"in": "header",
"name": "Cookie",
"schema": {
"type": "string"
}
}
],
"responses": {
Expand Down
6 changes: 6 additions & 0 deletions spec/swagger.json
Expand Up @@ -1673,6 +1673,12 @@
"description": "The URL to return to after the logout was completed.",
"name": "return_to",
"in": "query"
},
{
"type": "string",
"description": "HTTP Cookies\n\nWhen using the SDK in a browser app, on the server side you must include the HTTP Cookie Header\nsent by the client to your server here. This ensures that CSRF and session cookies are respected.",
"name": "Cookie",
"in": "header"
}
],
"responses": {
Expand Down

0 comments on commit 95ed2b9

Please sign in to comment.