vaadin / hilla

Build better business applications, faster. No more juggling REST endpoints or deciphering GraphQL queries. Hilla seamlessly connects Spring Boot and React to accelerate application development.
https://hilla.dev
Apache License 2.0
915 stars 57 forks source link

The logout URL specified in the security configuration should be available #45

Open Artur- opened 3 years ago

Artur- commented 3 years ago

Description of the bug

After doing logout() you typically want to refresh or redirect to another URL so that the user does not remain on a page she does not have access to. In the Spring Security configuration you provide a "logout URL" which is the URL to redirect to after logout. This URL should be available on the client side. Right now you need to manually enter it in the client side code.

Versions:

- Vaadin / Fusion version:21 alpha 5
platosha commented 2 years ago

Needs to be defined:

  1. How to exactly send the configuration properties to the client, preferably when bootstrapping the application (e. g., as index.html response content)
  2. Define the client-side API for accessing the properties

The logoutUrl is an example of server runtime configuration, so it is practically not available on build time.

Other related use cases:

Note that we have a global namespace Vaadin.TypeScript populated in the index.html script. One idea is to use it for sending the properties, and define a user-facing API around it for accessing those from TypeScript.

platosha commented 2 years ago

Let’s make a 3-day research to define and prototype the unknowns here.