You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Using online mode and testing date logic with sinon.useFakeTimers() throws "Error: 16 UNAUTHENTICATED: Request had invalid authentication credentials." #165
Any calls to firestore throws "Error: 16 UNAUTHENTICATED: Request had invalid authentication credentials. Expected OAuth 2 access token, login cookie or other valid authentication credential."
My hunch is that since useFakeTimers modifies the behavior of the Date object, it's causing the access token to be expired.
Is there any suggestions for a work around? Testing datetime logic seems pretty table stakes so I'd be surprised if no one else ran into this.
One idea was switching to offline mode, but that'd be a shame to have to do just for this kind of test.