Skip to content
This repository was archived by the owner on Mar 22, 2022. It is now read-only.

Without feathers-rest, unnecessary errors are created #384

Closed
elfey opened this issue Dec 23, 2016 · 8 comments
Closed

Without feathers-rest, unnecessary errors are created #384

elfey opened this issue Dec 23, 2016 · 8 comments
Assignees
Labels

Comments

@elfey
Copy link

elfey commented Dec 23, 2016

Steps to reproduce

Without feathers-rest configured on the server, feathers-authentication causes feathers to send back an error response of TypeError: Cannot set property 'headers' of undefined on both the client and server.

This is a link to a minimal reproducible setup.

This is a related Stack Overflow question that outlines a similar problem and what is going on.

Expected behavior

Webpage should load with desired response.

Actual behavior

Webpage receives error with undesirable response.

System configuration

Module versions (especially the part that's not working):

"feathers-authentication": "^1.0.2",

NodeJS version: 6.9.2
Operating System: macOS Sierra
Browser Version: Latest Chrome, same error on all browsers
Module Loader: NodeJS default require

@ekryski
Copy link
Member

ekryski commented Dec 30, 2016

Thanks @mz103! In many cases we do require REST to be enabled for auth. Specifically OAuth. I think at least we should add an appropriate error if feathers-rest is not configured. I'll look into seeing if we can just make this a dependency of the OAuth1 and OAuth2 plugins as it shouldn't be required for many of the other auth mechanisms. 🍻

@ekryski ekryski self-assigned this Dec 30, 2016
@ekryski ekryski added the Task label Dec 30, 2016
@wdmtech
Copy link
Contributor

wdmtech commented Jun 16, 2017

In many cases we do require REST to be enabled for auth. Specifically OAuth.

@ekryski Yep - this just bit me! 🙈 I created a new app with feathers-cli and all my services use websockets, so feathers-rest was never implemented.

@joakimglaving
Copy link

@ekryski is this still the case? Trying to set up GitHub OAuth2 but getting the same error as @elfey, no REST configured.

@daffl
Copy link
Member

daffl commented Jan 29, 2018

Yes, this is still the case. Probably won't be anymore in the upcoming version.

@joakimglaving
Copy link

Thanks for the quick reply @daffl. Do you have any idea when that version will be released?

@daffl
Copy link
Member

daffl commented Jan 29, 2018

Just Expressify your application for now. There is no timeframe on this at the moment.

@curioussavage
Copy link

I am using the new version I think and I still get this. Maybe a note in the documentation for the auth modules would be a good idea for now.

@daffl
Copy link
Member

daffl commented May 8, 2019

This has been addressed by the framework independent authentication in Feathers v4. Please see the migration guide for more information. Closing this issue in order to archive this repository. Related issues can be opened at the new code location in the Feathers main repository.

@daffl daffl closed this as completed May 8, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

6 participants