-
Notifications
You must be signed in to change notification settings - Fork 117
feathers-authentication 1.1.1 No auth token
#445
Comments
upon further search, I'm finding So this looks like a bug? Or maybe I have an unexpected configuration. |
aha, I figured it out! When registering services, I registered the auth service last. So when calling any other service, the middleware for exposing headers was not yet registered. I think this is at least worth mentioning, as it could probably save others a bit of headache :) |
@jiangts you saved my day. |
Gosh, experienced very same... What a name can do :) |
@Andreyco The problem is with the middleware that come bundled with the service and are registered implicitly when the plugin is configured. Also, services aren't middleware by another name. They don't really operate as middleware unless you chain a bunch of them together. Hooks, however, are multi-transport middleware. I've added a note to the top and bottom of the Auth Server API docs that will hopefully prevent this for others. |
@marshallswain Note is enough here, I think. Thanks ;) |
For me the order that's written up in the migration guide makes it fail. https://github.com/feathersjs/feathers-authentication/blob/master/docs/migrating.md Not working:
Working:
¯\_(ツ)_/¯ |
Ah. Thanks, @jasondonnette! I just fixed the order in the migration guide. |
when sending a request to a service with the following hooks:
with the HTTP headers
I get
I logged the headers on the server side, and indeed, there were none.
This was only fixed when I put this express middleware before my services ran:
This is breaking functionality not mentioned in the migration guide. This middleware should either automatically be included or be put in the migration guide.
The text was updated successfully, but these errors were encountered: