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

fix: add cookie for updateLogoutFlow #3284

Merged
merged 1 commit into from
May 24, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
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