1

I am writing some logic at openfin side in a plain typescript file to quit and logout an application at same time on a button click. So my quit function is working properly.

public async quit() {
      if (quitRequested) {
        const platform = getCurrentSync(); //get the current setting of the platform
        await closedownPlatform(); //close the application
        return super.quit();
      }
    }

But when I'm trying to implement logout and quit at same time it's not working. I tried this approach-

public async quit() {
          if (quitRequested) {
            const platform = getCurrentSync(); //get the current setting of the platform
            await closedownPlatform(); //close the application
            window.location.href = "http://localhost:3000/Logout"; //to logout the user
            return super.quit();
          }
        }

When I'm trying something like this, it logouts the user but didn't quit the application. The application keeps running on the back. How it can be done? Or is there any alternate approach for doing something like this?

2
  • 1
    loaction => location? Is this a typo when copying over code or does it exist in your actual code?
    – mochaccino
    Commented Mar 20, 2023 at 13:45
  • oh sorry, it's a typo while copying the code @vr Commented Mar 20, 2023 at 15:00

0

Browse other questions tagged or ask your own question.