Looks like the Firebase team added a new cookie based persistence method: https://firebase.google.com/support/release-notes/js#authentication
Added Persistence.COOKIE, a new persistence method backed by cookies. The browserCookiePersistence implementation is designed to be used in conjunction with middleware that ensures both your front and backend authentication state remain synchronized.
Is this helpful in simplifying the persistence logic for this library?