Skip to content

Elaborate on refreshToken examples#2362

Open
taylorkline wants to merge 1 commit intoreduxjs:masterfrom
taylorkline:patch-1
Open

Elaborate on refreshToken examples#2362
taylorkline wants to merge 1 commit intoreduxjs:masterfrom
taylorkline:patch-1

Conversation

@taylorkline
Copy link
Copy Markdown
Contributor

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.

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.
@codesandbox-ci
Copy link
Copy Markdown

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:

Sandbox Source
Vanilla Configuration
Vanilla Typescript Configuration
rsk-github-issues-example Configuration
@examples-query-react/basic Configuration
@examples-query-react/advanced Configuration
@examples-action-listener/counter Configuration

@netlify
Copy link
Copy Markdown

netlify Bot commented May 27, 2022

Deploy Preview for redux-starter-kit-docs ready!

Name Link
🔨 Latest commit 0b55cfe
🔍 Latest deploy log https://app.netlify.com/sites/redux-starter-kit-docs/deploys/6290fe32b4e22f0007039e75
😎 Deploy Preview https://deploy-preview-2362--redux-starter-kit-docs.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site settings.

@phryneas
Copy link
Copy Markdown
Member

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 httpOnly cookie that is never accessed from JavaScript.

I would be okay with { url: '... } I think, that should not distract too much from the real point of the example. 🤔
What do you think @markerikson ?

@taylorkline
Copy link
Copy Markdown
Contributor Author

taylorkline commented Jun 10, 2022

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.

@phryneas
Copy link
Copy Markdown
Member

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 :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants