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

Auth redirect issue #425

Closed
Viskazz opened this Issue Feb 25, 2017 · 2 comments

Comments

Projects
None yet
3 participants
@Viskazz
Copy link

Viskazz 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

This comment has been minimized.

Copy link
Member

marshallswain commented Mar 23, 2017

@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

This comment has been minimized.

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 Mar 24, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.