-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
Attempt at adding header auth. Ignore Settings #981 #1390
Attempt at adding header auth. Ignore Settings #981 #1390
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
Changes preview: |
I have no clue if you'd prefer to pull in the config globally server side or parse it per request? This is quickly creeping in scope. I just have documentation and I think this will be ready. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks awesome, I'll test it out properly either this evening or tomorrow evening
Once reviewed, is it ready for merge on your side?
Adding documentation of how to configure this is the last task I have then. Yay!!! |
I was starting to write the documentation and realized I'm still missing the proxyWhitelist implementation. That is an important feature but your web server/reverse proxy should be securing that header for you too. |
.catch(() => window.location.reload()); | ||
} | ||
store.dispatch(Keys.INITIALIZE_CONFIG).then((thing) => { | ||
console.log('main', thing); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe don't need this here 😉
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh just realized it was me who left that there ! 😅
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Likely slept since then :-)
I can remove the comment and push again. It was helpful with the race condition.
Anything I can do to help get this ready? |
afaict |
@dschmidt - I'll get a new release pushed out within the next week, I just need to test everything to avoid anything breaking. |
Category: Feature... and hopefully some documentation to go with it.
Overview
TLDR: Attempt to implement #981 Add header authentication.
I needed to get
req.headers['Remote-User']
from the server side header to authenticate my user so I didn't need another password. I think this needed aservices/get-user.js
to make that happen although I've never worked with vuejs, etc.I found your 2.1.2 and it had a good start at the config race condition in main.js that I was running into with implementing headerAuth. I will say I'm not that good at async coding so there might be some big issues. I have it working for my use case which isn't what a maintainer likes to hear.
REMOTE-USER
mostly because I don't know how to accessgetAppConfig().headerAuth.userHeader
in the nodejs services/get-user.js which is one of the few things I need to make this configurable.This is my first js project in years so I'm open to direction and LMGTFY feedback.
Issue Number #981
New Vars
Code Quality Checklist (Please complete)