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.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Mar 22, 2022. It is now read-only.
Hey guys. Started to migrate authentication from v0.7.12 to v1.1.0 over the app generated originally by feathers.
I had the REST authentication working just fine, but had problems getting it to work with Sockets.io, so we switched to the new version.
Now, we got Sockets.io authentication working, but REST doesn't. It doesn't matter what I send to the server (user:password), it always returns an access token, without checking for the user credentials on the database.
What am I missing?
I turned on authentication debug (very cool), this is what I get when I make a request:
'use strict';constglobalHooks=require('../../../hooks');consthooks=require('feathers-hooks');constauth=require('feathers-authentication');constlocal=require('feathers-authentication-local');exports.before={create: [console.log('HEY AUTH'),//<-- I never see this executeauth.hooks.authenticate(['local'])]};
The text was updated successfully, but these errors were encountered:
The create console.log won't run because a hook is a function:
exports.before={create: [function(hook){console.log('HEY AUTH'),//<-- I never see this execute},auth.hooks.authenticate(['local'])]};
Also, have a look how the new generator (npm install feathers-cli@pre -g) sets everything up. Just returning that object that you have from src/services/authentication/index.js will probably not do anything.
Hey guys. Started to migrate authentication from v0.7.12 to v1.1.0 over the app generated originally by feathers.
I had the REST authentication working just fine, but had problems getting it to work with Sockets.io, so we switched to the new version.
Now, we got Sockets.io authentication working, but REST doesn't. It doesn't matter what I send to the server (user:password), it always returns an access token, without checking for the user credentials on the database.
What am I missing?
I turned on authentication debug (very cool), this is what I get when I make a request:
Versions:
config/default.json
src/app.js
src/services/index.js
src/services/authentication/index.js
The text was updated successfully, but these errors were encountered: