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

Sub-app issue with different authentication configuration #341

Closed
mcchrish opened this issue May 27, 2016 · 5 comments
Closed

Sub-app issue with different authentication configuration #341

mcchrish opened this issue May 27, 2016 · 5 comments

Comments

@mcchrish
Copy link

I have 2 sub-apps with each of their own auth configs, like:
App1:

{
  "local": {
    "usernameField": "username",
    "password": "password"
  }
}

App2:

{
  "local": {
    "usernameField": "emailAddress",
    "password": "password"
  }
}

But it seems one is overwriting the other depending on the order of mounting to a main feathers app.

@ekryski
Copy link
Contributor

ekryski commented Jun 1, 2016

@mcchrish any chance you can put together a quick gist or github repo replicating the issue? We haven't really tested auth with sub-apps but I'd like to be able to support it.

@mcchrish
Copy link
Author

mcchrish commented Jun 1, 2016

@ekryski here you go https://github.com/mcchrish/feathers-sub-app

Based on the feathers-cli generated app.
One app have a usernameField: username, the other is usernameField: email.
Only one of them will work depending on the order of require or import here:
https://github.com/mcchrish/feathers-sub-app/blob/master/src/index.js

@mcchrish
Copy link
Author

mcchrish commented Jun 2, 2016

Hey. I just want to ask if there's a chance this issue will be solved anytime soon. If not, I guess I'll have to refactor and split my project into two separate feathers servers for the time being.

@daffl
Copy link
Member

daffl commented Jun 4, 2016

We recently made a fix in feathersjs-ecosystem/transport-commons#18 and feathersjs-ecosystem/socketio#27 so make sure you have the latest versions installed. It may fix it but we have not tested it yet. For v1 we will definitely make sure this configuration works but that might be another month or two.

@daffl daffl added this to the Auk milestone Aug 16, 2016
@ekryski ekryski added the Bug label Oct 17, 2016
@daffl daffl modified the milestone: Auk Jun 23, 2017
@daffl
Copy link
Member

daffl commented Jun 6, 2019

This has been addressed in Feathers v4 which allows to register and connect to multiple authentication services. See the Migration guide for more information on how to upgrade.

@daffl daffl closed this as completed Jun 6, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants