feathers-apollo icon indicating copy to clipboard operation
feathers-apollo copied to clipboard

start auk auth upgrades

Open swarthout opened this issue 7 years ago • 6 comments

swarthout avatar May 04 '17 22:05 swarthout

@swarthout

Don't you also have to get an anonymous token on client side and pass it along with non-authenticated requests? in addition to getting auth token for authenticated requests. I thought I saw something like that in the docs.

idibidiart avatar May 08 '17 16:05 idibidiart

Hi Scott, I just cloned the auk-update branch and I found an error on line 9 of the file: src/services/viewer/hooks/index.js where auth.hooks.authenticate('jwt'), should be auth.authenticate('jwt') since the require is const auth = require('feathers-authentication').hooks;

After I changed that, the code is running. However, I'm seeing this message on the console Mongoose option.lean is false. Use hook.results.toObject() to convert the results to JS objects

lobosan avatar May 08 '17 16:05 lobosan

Another problem that I found is when I'm testing the mutations located at examples/mutations.graphql where signUp works fine but logIn gives me this error:

Route: /auth/local - Page not found

lobosan avatar May 09 '17 13:05 lobosan

Thanks for the help! Did feathers change the routes for auth with the new release?

swarthout avatar May 09 '17 13:05 swarthout

I'm looking at the documentation and it seems that the path is now "authentication" but strategy should be defined as local, also the config file should be double checked as well as the imports.

Have a look at these resources, or maybe use the cli generator with the command feathers generate authentication https://docs.feathersjs.com/guides/chat/authentication.html https://github.com/feathersjs/feathers-authentication-local https://github.com/feathersjs/feathers-authentication/blob/master/docs/migrating.md https://github.com/feathersjs/feathers-authentication

lobosan avatar May 09 '17 13:05 lobosan

Warning: latest updates of feathers packages are now distributed under @feathers scope on NPM !

poupryc avatar Jan 09 '18 18:01 poupryc