Authenticating with Google - #54
MrFjellstad wants to merge 12 commits into
Conversation
|
Looks like karma.conf.js needs to load more files. |
There was a problem hiding this comment.
I think we've talked about this part before, and I believe you told me that this didn't imply to serve the entirety of static/ through the node app?
If that is correct we can keep it like this for now ( unless there's a easy way of splitting the parts actually needed out of static/?), but down the road I want to split the repo to make it more visible that service/ is a api and static/ is a client for this api, there shouldn't be any hard connection in the code between the two ( opens the possibility of writing other clients, e.g. native phone app ) ( + stuff like https://david-dm.org/ requires a root directory package.json).
Then I'd like to see a separate server wrapping(and serving) static/ for authentication ( this would be the connectionpoint with google auth etc) and connecting with service/ rather via OAuth server to server.
There was a problem hiding this comment.
I think we need to run the parts we want to authenticate trough the node server.
Maybe it is time to start looking at webtokens...
There was a problem hiding this comment.
Looks like the problem is the redirect that google does back to our server after a successful login. It gets confused if the ports doesn't match.
There was a problem hiding this comment.
The problem is of course CORS. We use cookie authentication, and that doesn't work well with different ports!
|
Awesome stuff. |
Finally! Rewrote it to work with the new code. Think I have fixed all the comments!
Need to serve the static files trough the node server to get stuff to work...
Missing stuff:
Store the credentials in the database so we can use them for something interesting NSA style!