feathers-reduxify-authentication icon indicating copy to clipboard operation
feathers-reduxify-authentication copied to clipboard

Naming of variables might be off.

Open testless opened this issue 6 years ago • 3 comments

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]

testless avatar Aug 07 '18 15:08 testless

I made a PR. Seems clearer;)

testless avatar Aug 07 '18 16:08 testless

Isn't user is the name of the user service?

eddyystop avatar Aug 07 '18 22:08 eddyystop

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.

testless avatar Aug 08 '18 04:08 testless