Custom storage never used
See original GitHub issueWhen setting a custom storage engine vie the config
const config = {
authUrl,
storage: myStorageEngine,
userAttributes: {
firstName: 'first_name',
imageUrl: 'image',
},
userRegistrationAttributes: {
firstName: 'first_name',
},
}
the passed custom storage is never used.
I think this is due to this line
Since flushGetRequests
is only present in react native localStorage, the code always fallback to AsyncLocalStorage
, which itself default to window.localStorage
.
Shouldn’t that ternary operator expression reversed ?
Issue Analytics
- State:
- Created 5 years ago
- Comments:5
Top Results From Across the Web
How to Sneak Custom Storage Into Every Room of Your House
From custom closets to faux built-ins and on-the-wall organizers, here's how to work extra storage space into your home's design plan.
Read more >Using custom storage engine on React Native #599 - GitHub
Run it with the Android emulator and SET_ITEM is logged. Run it with the iOS emulator and SET_ITEM is never logged.
Read more >37 Ways to Add Extra Storage to Every Room - This Old House
Here's how to build a beautiful, custom window seat in just a couple of days using ready-made kitchen cabinets. This simple, do-it-yourself approach...
Read more >37 Corner Storage Options (Every Room Covered) - Pinterest
Jan 27, 2019 - Check out these 37 different types of corner storage options. Includes kitchen corner storage, bathroom, living room, home office,...
Read more >6 Storage Designs For Your Custom Home
You've tried using a pantry organizer before but it never worked for you! You're tired of cooking in a cramped kitchen with no...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I’m not using npm.
The code is from the master branch here:
https://github.com/kylecorbelli/redux-token-auth/blob/8c5a8fe573918d406a733ca1b21c0b4349f137ab/src/actions.ts#L133
From what I can observe, passing custom
storage
in the config doesn’t work at all with the npm package. That’s the issue I’m trying to raise here. Regarding your point withstorage.flushGetRequests
, I believe you are correct. I had to mock flushGetRequests to get cookies as the storage mechanism. Thanks for pointing that out.