'Why does firebase store access token in index DB for flutter web?

I realized firebase auth for flutter web stores the user's access token in index DB. I thought this is not safe. I understand the access token must be persistent to maintain the authentication state. But based on the research I made here and here, I understood storing access tokens in local storage, session storage, and index DB are all vulnerable to XSS attacks therefore httpOnly cookies should be used instead.



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source