eddyystop / feathers-reduxify-authentication

Wrap feathers-client.authentication so it works with Redux, as well as authentication, authorization packages for React-Router.
MIT License
22 stars 13 forks source link

Feathers accessToken is not saved #3

Closed amonraRivers closed 7 years ago

amonraRivers commented 7 years ago

I am trying to use feathers-reduxify-authentication on a react-native app with feathers-redux . The action "SERVICES_AUTHENTICATION_AUTHENTICATE_FULFILLED" is dispatched correctly and the payload contains the accessToken: payload.accessToken=xxxxxxxxxxxx

The store does not save the token because it is expecting a field called token, and the user is not saved as I understand, the user data has to be fetched in a later operation. But my issue is with saving the accessToken. I can currently change code line 84 from [opts.token]: action.payload.token, to [opts.token]: action.payload.accessToken, Can you help me have a more permanent solution? react-native-cli: 2.0.1 react-native: 0.45.1 feathers-reduxify-authentication v0.1.1

eddyystop commented 7 years ago

All feathers-redxify-authentication does is call app.authenticate() on the client while maintaining a flag in state whether authe.ntication is in process or not.

Its your responsibility to set up that internal app.authenticate().

eddyystop commented 7 years ago

Does this address your issue? https://github.com/eddyystop/feathers-reduxify-authentication/pull/4

amonraRivers commented 7 years ago

Yes, thank you.