feathers-reduxify-authentication
feathers-reduxify-authentication copied to clipboard
Naming of variables might be off.
Hi there,
if my understanding of this library is correct, the following variables should be the same, I guess:
https://github.com/eddyystop/feathers-reduxify-authentication/blob/master/src/index.js#L15 https://github.com/eddyystop/feathers-reduxify-authentication/blob/master/src/index.js#L57 https://github.com/eddyystop/feathers-reduxify-authentication/blob/master/src/index.js#L72 https://github.com/eddyystop/feathers-reduxify-authentication/blob/master/src/index.js#L83
Is this correct?
The payload of my auth call is { user: object, accessToken: string }
So action.payload.data
should be action.payload[opts.user]
https://github.com/eddyystop/feathers-reduxify-authentication/blob/master/src/index.js#L46
and [opts.data]
in
https://github.com/eddyystop/feathers-reduxify-authentication/blob/master/src/index.js#L57
https://github.com/eddyystop/feathers-reduxify-authentication/blob/master/src/index.js#L72
should be [opts.user]
I made a PR. Seems clearer;)
Isn't user
is the name of the user service?
Yes, I think so, but I don't know what opts.data stands for. My guess, it is just a typo. feathers-redux doesn't handle auth, that is why I am still using this here.