Live data from Hacker News

HelloJS – Client-side OAuth for JS

adodson.com

11–20 of 58 posts

Re: HelloJS – Client-side OAuth for JS

#12
post #4
post #2

Thanks for sharing my project HelloJS

Hi... thanks for writing this. As a newb on these sorts of issues, I have some questions: 1. So this is 100% client side... Why do I see "npm" in the instructions? Isn't that connected to nodejs? What if I'm writing a java web server app, will this still work, or does it need to talk to a nodejs server somehow? 2. I take it none of this hits a third party server (i.e. your server)? 3. How do I get the user's info obt…

1. NPM is used for installing bower [1], a package manager for client side libraries.

[1] http://bower.io/

Re: HelloJS – Client-side OAuth for JS

#13
Hmm, I don't see any mention of security. I can't find the source, but I remember reading that if you wanted to restrict access to certain pages on your site to authenticated users in a single page app it was more secure to do it server side. Security experts feel free to chime in.

Re: HelloJS – Client-side OAuth for JS

#14

Very interesting project! Can you explain what some of the differences are between this library and PassportJS?

PassportJS = NodeJS authentication, designed for single sign-on.

HelloJS = Browser + Phonegap authentication and API request handling designed to interact with thirdparty services from the client app.

Re: HelloJS – Client-side OAuth for JS

#16
post #13

Hmm, I don't see any mention of security. I can't find the source, but I remember reading that if you wanted to restrict access to certain pages on your site to authenticated users in a single page app it was more secure to do it server side. Security experts feel free to chime in.

From my understanding this is also the case ie. don't do OAuth client (end-user/browser) side.

Re: HelloJS – Client-side OAuth for JS

#17
post #13

Hmm, I don't see any mention of security. I can't find the source, but I remember reading that if you wanted to restrict access to certain pages on your site to authenticated users in a single page app it was more secure to do it server side. Security experts feel free to chime in.

From my understanding this is also the case ie. don't do OAuth client (end-user/browser) side.

If the client passes the server a token which the server can verify against the third-party service providing the login, I don't see a reason not to trust the client. I'm very interested to hear what kind of security problems this could bring - if they can be mitigated, using this library would be very convenient for some projects.

Re: HelloJS – Client-side OAuth for JS

#19
post #13

Hmm, I don't see any mention of security. I can't find the source, but I remember reading that if you wanted to restrict access to certain pages on your site to authenticated users in a single page app it was more secure to do it server side. Security experts feel free to chime in.

Using client-side script to restrict access is a big no from a security stand point. From what I have read this library is intended to interact with third party services rather than for access. E.g. pulling in photos, contacts etc

Re: HelloJS – Client-side OAuth for JS

#20
post #13

Hmm, I don't see any mention of security. I can't find the source, but I remember reading that if you wanted to restrict access to certain pages on your site to authenticated users in a single page app it was more secure to do it server side. Security experts feel free to chime in.

Assuming OAuth uses random numbers (don't remember if it does), one issue could be that the RNG of Javascript is not cryptographically secure. I'd be interested to hear the opinion of a security expert too.
Post reply on HN