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

Auth redirect issue #425

Closed
vihapr opened this issue Feb 25, 2017 · 2 comments
Closed

Auth redirect issue #425

vihapr opened this issue Feb 25, 2017 · 2 comments

Comments

@vihapr
Copy link

vihapr commented Feb 25, 2017

Sorry, im noob. I have this folder structure on server:

 |_src/ ...with services, middleware inside, etc..
 |_public/
     |_ css/
     |_ js/
     |_ views/
          |_ operator/
          |_ not-auth-conent/

I'm attempting to redirect success auth to /operator folder like this:

app.get('/auth/success', function (req, res) {
  res.sendFile(path.resolve(__dirname, '/views/operator/operator.html'));
});

There is no issue with 'not-auth-content' htmls, which i can render with res.render() via ejs engine. And paths looks like localhost/operator, localhost/whatever. I.e. without 'view'. But redirect not working at all.
I dont want to use config successRedirect option to ../../../views/operator/operator.html cause it's open server folder structure. That's the problem with res.sendFile ? I have a same small app w\o feathers (only express) and redirects works well.

@marshallswain
Copy link
Member

@exppro I don't see anything that would cause a problem, there. You should be able to go to /auth/success and see your operator.html file even without logging in. If that's not the case, could you post a stripped down version of your repo that we could check?

@ekryski
Copy link
Member

ekryski commented Mar 24, 2017

@exppro did you get it sorted? I'm going to assume yes and close this out. Feel free to let us know if not.

@ekryski ekryski closed this as completed Mar 24, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants