Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Another readme incorrect and maybe docs to #441

Closed
genyded opened this Issue Mar 9, 2017 · 3 comments

Comments

Projects
None yet
2 participants
@genyded
Copy link

genyded commented Mar 9, 2017

Trying to execute the (client) code as is from the readme fails (even if #440 is addressed) because apparently hooks are required for auth but they are not imported (or configured) per the readme code:

Error: It looks like feathers-hooks isn't configured. It is required before running feathers-authentication
@marshallswain

This comment has been minimized.

Copy link
Member

marshallswain commented Mar 9, 2017

It looks like the hooks plugin is used in the README. Am I looking at the wrong branch? I'm in legacy in the screenshot, below.

screen shot 2017-03-09 at 3 37 54 pm

@genyded

This comment has been minimized.

Copy link
Author

genyded commented Mar 9, 2017

You're in the right place, but that is the SERVER code, we're talking about the client code just below it:

import io from 'socket.io-client';
import feathers from 'feathers/client';
import hooks from 'feathers-hooks';
import socketio from 'feathers-socketio/client';
import localstorage from 'feathers-localstorage';
import authentication from 'feathers-authentication/client';

const socket = io('http://localhost:3030/');
const app = feathers()
  .configure(socketio(socket)) // you could use Primus or REST instead
  .configure(hooks())
  .configure(authentication({ storage: window.localStorage }));

app.authenticate({
  type: 'local',
  'email': 'admin@feathersjs.com',
  'password': 'admin'
}).then(function(result){
  console.log('Authenticated!', result);
}).catch(function(error){
  console.error('Error authenticating!', error);
});
@genyded

This comment has been minimized.

Copy link
Author

genyded commented Mar 9, 2017

OK maybe we we're in the wrong place... where ever we copied and pasted from did not have the hooks, but we see they are there now. Sorry.

@genyded genyded closed this Mar 9, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.