feathersjs-ecosystem / feathers-localstorage

A client side service based on feathers-memory that persists to LocalStorage
MIT License
38 stars 15 forks source link

Make behaviour the same as normal database services again #7

Closed daffl closed 8 years ago

daffl commented 8 years ago

I have some changes for feathers-authentication/client incoming which does not require feathers-localstorage to behave differently than the normal feathers-memory. This reverts the changes we had to do and closes #6.

ekryski commented 8 years ago

We'll need to test this React Native before we merge it.

daffl commented 8 years ago

This should work in RN as well since those changes were only hacks to work with arbitrary ids and creating when doing an update.

I think for authentication we should go back to a transparent storage abstraction like:

// use memory be default
// use localStorage
app.set('storage', window.localStorage);
// use AsyncStorage
app.set('storage', asyncStorage);
// use custom store
app.set('storage', {
  getItem(key) {},
  setItem(key, value) {}
});

For user and token storage so that we don't have to hack the behaviour of what is technically supposed to be a standard Feathers database service.

ekryski commented 8 years ago

:shipit: