I’m using ESA implicit grant authentication.
If a user is not logged in I display just an empty application template with a header containing “Login” button. When clicking on Login button, I redirect the user to the corporate login page:

First time I am successfully redirected to the corporate login page. But after being authenticated and redirected back to dashboard page, its content is empty and I had to explicitly click on dashboard link in the side menu to display it;

Logout action does not work any more: pages is reloading several times and I’m again logged in.

and there is no errors in the browser console, nothing at all
What is weird, Firefox displays it nevertheless after clicking on Logout button. But in Chrome and Safari, clicking on logout results in endless refreshing.

What template is your logout button in? Is it in a component or directly in the application template? You want the logout action in the controller or component that powers the template the action is used in.

As I don’t have a component defined for that, I think application controller would be good to put it.

After clicking on logout button, URL keeps being as http://localhost:4200/callback#access_token=XXXXXX&token_type=Bearer&expires_in=7199 for 1-2 seconds and then it changes again for localhost:4200/dashboard and I can see that I’m logged in again.

That would be expected, the logout only invalidates the client side session, if your session with the oauth provider is still valid the application will forward to the oauth login url and the provider will instantly post back to your callback to log you in, you may need to implement some other logic to invalidate the session with your oauth provider if you want to be taken back to a login page.