Skip to content

[doc issue] Appending query parameter to the logoutEndpoint #265

@nocin

Description

@nocin

Issue description

Hi,

it seems the documentation is not clear enough, or it could also be a bug.
The documentation mentions, that you can provide a query parameter to the logout endpoint.

The logoutEndpoint can be called with query parameters. For example:
Sample Code

window.location.replace('/my/logout?siteId=3');

Followed by the xs-app.json sample

In the following example, my-static-resources is a folder in the working directory of the application router; the folder contains the file logout-page.html along with other static resources.
Sample Code

{ 
  "authenticationMethod": "route", 
  "logout": { 
    "logoutEndpoint": "/my/logout", 
    "logoutPage": "/logout-page.html"
  }, 
  "routes": [ 
    {
      "source": "^/logout-page.html$", 
      "localDir": "my-static-resources", 
      "authenticationType": "none"
    }
  ]
} 

When appending a query parameter, in the URL you see the query parameter got successfully appended /logged-out.html?siteId=3, but the app router will not resolve correctly. It then forces you to login, followed by a:

Cannot GET /logged-out.html

I could resolve the issue by adjusting the source pattern in the xs-app.json.

From

"source": "^/logout-page.html$",

To

"source": "^/logged-out.html(\\?.*)?$",

Tested with approuter version 20.

BR,
Nico

Feedback Type (Optional)

None

Page Title on SAP Help Portal (prefilled)

logout

Page URL on SAP Help Portal (prefilled)

https://help.sap.com/docs/btp/sap-business-technology-platform/logout

Metadata

Metadata

Assignees

Labels

size/lRequires large effort to get changed.type/claritySomething was unclear in the documentation.ua-reviewUnder review by the UA team

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions