how do you logout hilla oauth2 application. i need a logout button in frontend
here is what i did sofar in der server i wrote a logout endpoint function.
@Endpoint
@PermitAll
public class AuthEndpoint {
public void logout() {
SecurityContextHolder.clearContext();
System.out.println("server logout ...");
}
}```
in Frontend
const logoutAction = () => {
console.log(“react logout …”);
AuthEndpoint.logout();
}```
calling this give me 403 FORBIDDEN error in the browser. how will you trigger a logout from react.