Elaborate on refreshToken examples#2362
Conversation
I was silly and it took me a bit to realize that, just as with mutations and queries, the first argument to `baseQuery` can be a `string` in short form but a more verbose object argument may be provided. I think a longer form example will help people to realize how a custom baseQuery can work.
|
This pull request is automatically built and testable in CodeSandbox. To see build info of the built libraries, click here or the icon next to each commit SHA. Latest deployment of this branch, based on commit 0b55cfe:
|
✅ Deploy Preview for redux-starter-kit-docs ready!
To edit notification comments on pull requests, go to your Netlify site settings. |
|
To be honest, I'd rather not show POSTing the refresh token, or people might start doing that - the most secure way here would be to have the refresh token set at login by the server as a I would be okay with |
|
I see your point in the web space, but in React Native, we store the refresh token in biometric-protected keychain services / SharedPreferences, and fetch it out of that encrypted storage for refreshes. Though I see what you mean since most of the RTK Query examples are geared towards web. |
|
Of course there are good reasons to do it - but they you know you want that - I just don't want to steer web users the wrong direction :) |
I was silly and it took me a bit to realize that, just as with mutations and queries, the first argument to
baseQuerycan be astringin short form but a more verbose object argument may be provided. I think a longer form example will help people to realize how a custom baseQuery can work.