Refreshing A Token With Apollo-client + Firebase Auth
I'm having some trouble figuring out token refreshes when using apollo-client and firebase's auth service. I've setup token refresh using apollo client before. Typically I use the
Solution 1:
The code above actually works!
My issue was here:
if (graphQLErrors[0].message.includes('Signature has expired')) {
My server's error message is actually 'Token has expired'. I changed my if statement above, and all is well!
I didn't find a lot of examples of apollo-client+firebase-auth online, so hopefully this breadcrumb can help others when working with apollo-client and firebase auth.
Post a Comment for "Refreshing A Token With Apollo-client + Firebase Auth"