Safely closes the authentication window and cleans up resources,
handling any errors that might occur during window closure.
This function is idempotent and can be called multiple times
without error, even if the window is already closed.
Returns void
Example
// Close the authentication window when tokens are received closeAuthWindow();
Closes the authentication window if it exists
Safely closes the authentication window and cleans up resources, handling any errors that might occur during window closure. This function is idempotent and can be called multiple times without error, even if the window is already closed.