I'm planning on using this with the Apollo GraphQL client rather than the provided authFetch so I need a way to get the token and I don't like the idea of going to the localStorage directly as it kind of defeats the purpose of using this package. Long story short (and as the title says), I've add a getToken function to the response from createAuthProvider.
Ignore this. I just discovered, with a very small amount of effort, that I can use a custom fetch with the Apollo client so the authFetch will actually fit my requirements making this PR somewhat useless.
I'm planning on using this with the Apollo GraphQL client rather than the provided authFetch so I need a way to get the token and I don't like the idea of going to the localStorage directly as it kind of defeats the purpose of using this package. Long story short (and as the title says), I've add a
getToken
function to the response fromcreateAuthProvider
.My thinking is that this would be used like...
Is that correct? If not then this PR will make no sense.