News for hackers. Stuff that matters.
Re:Show HN: OAuth microservice for FB, Twitter, etc. by Sujan on Tuesday July 04, 2017 @09:15AM (#14695658)
The information on `/login` should probably be on / so I can read somewhere what "Stateless authentication microservice" actually means.

Also maybe a sentence why this is neat and should be used...

Re:Show HN: OAuth microservice for FB, Twitter, etc. by aisofteng on Tuesday July 04, 2017 @09:00PM (#14699324)
"Stateless authentication microservice" has only one possible meaning to me. Did you want to ask something more specific, or do you just not know what those (common) words mean?
Re:Show HN: OAuth microservice for FB, Twitter, etc. by Sujan on Wednesday July 05, 2017 @03:44AM (#14700558)
The me it means... nothing specific.

It tells me that is has something to do with login, "without state" (whatever this means in this context) and that it is somehow not a "big service" but very "micro", so probably independent. Stateless and microservice can mean so many things.

Re:Show HN: OAuth microservice for FB, Twitter, etc. by aisofteng on Wednesday July 05, 2017 @08:17AM (#14701765)
Those words have one meaning each.

A microservice is a service that does only one thing, and does it simply.

Something stateless doesn't keep state - after an interaction with a client, nothing has changed in the service itself.

A stateless authentication microservice is something I would expect to run, listen on a port for some sort of authentication credentials, and return either some sort of authorizarion token or an authentication error.

I don't see where the confusion comes from.

Re:Show HN: OAuth microservice for FB, Twitter, etc. by Sujan on Wednesday July 05, 2017 @09:24AM (#14702182)
Obviously it comes from you being so much smarter than me.
Re:Show HN: OAuth microservice for FB, Twitter, etc. by fitz2001 on Tuesday July 04, 2017 @10:49AM (#14696150)
Would be great if you could create an issue and write some more details about your requirement.
Re:Show HN: OAuth microservice for FB, Twitter, etc. by rhizome on Tuesday July 04, 2017 @12:17PM (#14696689)
Does "put information about the service on the front page" really require a ticket?
Re:Show HN: OAuth microservice for FB, Twitter, etc. by kasparsklavins on Tuesday July 04, 2017 @03:23PM (#14697761)
It doesn't.

Asking to do a pull request or create an issue is just a polite way of saying fuck off.

Re:Show HN: OAuth microservice for FB, Twitter, etc. by dtech81 on Tuesday July 04, 2017 @01:54PM (#14697272)
Nope, but a ticket helps them track it, helps make your request more durable, more likely to be developed into a higher resolution of detail, and ultimately more likely to be fulfilled.
Re:Show HN: OAuth microservice for FB, Twitter, etc. by rhizome on Tuesday July 04, 2017 @02:23PM (#14697435)
Thanks, but I know what trouble tickets are.
Re:Show HN: OAuth microservice for FB, Twitter, etc. by paulddraper on Tuesday July 04, 2017 @01:05PM (#14697000)
A response to request for detail with a request for detail...

Perhaps you could describe what details you would like to see in the issue? :)

---

In seriousness, noobish me would like to understand more what this is and when I should use it.

Re:Show HN: OAuth microservice for FB, Twitter, etc. by Sujan on Wednesday July 05, 2017 @03:51AM (#14700600)
I actually didn't know that the repo also includes the website (in `/example/nextjs/pages/index.js`) that was linked here.

There you go: https://github.com/lipp/login-with/issues/25

Re:Show HN: OAuth microservice for FB, Twitter, etc. by saganus on Tuesday July 04, 2017 @10:44AM (#14696132)
So what's exactly the use case for this? I'm not entirely sure.

Let's say I deploy it. Users of whatever service I provide use this to login to Google, Twitter, etc, then what? do I need to also implement something on the servers I'm protecting behind a login? I.e. some "verification" method that checks whether the client's JWT tokens are valid so I can grant them access?

Re:Show HN: OAuth microservice for FB, Twitter, etc. by fitz2001 on Tuesday July 04, 2017 @11:02AM (#14696229)
It's helpful if you want your website/webapp to support login with X (Google, Facebook, etc). Your services on the same domain can than use these credentials and eventually use the respective API's with the per-user key.

All you need to do is: a) get key/secret for the respective service b) deploy this microservice with the respective env variables

Re:Show HN: OAuth microservice for FB, Twitter, etc. by usea on Tuesday July 04, 2017 @12:18PM (#14696697)
This kind of explanation would be really useful on the website. Right now it has nothing to describe what it is/does.
Re:Show HN: OAuth microservice for FB, Twitter, etc. by aisofteng on Tuesday July 04, 2017 @09:03PM (#14699332)
The explanation you replied to didn't say anything I didn't find obvious from the tag line.
Re:Show HN: OAuth microservice for FB, Twitter, etc. by saganus on Tuesday July 04, 2017 @11:30AM (#14696420)
Aha. So it protects the service via protecting the domain itself, right?

I'll have to give it a try.

Re:Show HN: OAuth microservice for FB, Twitter, etc. by nielsole on Tuesday July 04, 2017 @11:06AM (#14696264)
"On successful login two cookies will be created:

    jwt - A "JSON Web Token" (JWT) containing profile information and the respective access tokens (Twitter/etc). http-only!
    profile - A JSON string which containing non-sensitive information (accessible from browser JS):
        username - string / mandatory, the account specific user alias (e.g. Twitter name)  - photo - string / optional, the account specific user image link
        name - string / optional, the "real" name
" This looks like just enough rope to hang oneself. If you check only the profile variable it could easily be set by the user herself. So I guess you need to check the jwt. I guess it makes more sense if this would be run as reverse proxy so the cookies can't be tampered with.
Re:Show HN: OAuth microservice for FB, Twitter, etc. by transitorykris on Tuesday July 04, 2017 @12:28PM (#14696757)
The JWT is signed (see LW_JWT_SECRET env variable), you'll want to check the signature before trusting the rest of the contents.
Re:Show HN: OAuth microservice for FB, Twitter, etc. by _ao789 on Tuesday July 04, 2017 @01:13PM (#14697052)
Pet gripe: don't say "JWT tokens", it's just "JWT". That's what the T stands for..
Re:Show HN: OAuth microservice for FB, Twitter, etc. by saganus on Tuesday July 04, 2017 @05:31PM (#14698424)
True. It's a bad habit I guess.
Re:Show HN: OAuth microservice for FB, Twitter, etc. by jarym on Tuesday July 04, 2017 @10:04AM (#14695940)
I found the GitHub link to contain a lot of useful info about what this is: https://github.com/lipp/login-with

Very nice work!

Re:Show HN: OAuth microservice for FB, Twitter, etc. by johnbellone on Tuesday July 04, 2017 @09:22AM (#14695690)
This is really cool. I was looking for something like this a few days ago for a side project. Great job!
Re:Show HN: OAuth microservice for FB, Twitter, etc. by fitz2001 on Tuesday July 04, 2017 @10:49AM (#14696153)
THX!
Re:Show HN: OAuth microservice for FB, Twitter, etc. by olalonde on Tuesday July 04, 2017 @01:45PM (#14697222)
Re:Show HN: OAuth microservice for FB, Twitter, etc. by hultner on Tuesday July 04, 2017 @12:19PM (#14696703)
How does it handle revoked and expired sessions?

From my prior research this seems to be a problem with the JWT which would either require distribution of ever growing blacklists or session verification through shared server side sessions.

Would also love to see some API documentation.

I really like the idea and always reimplementing login services seems like unnecessary hassle.

Re:Show HN: OAuth microservice for FB, Twitter, etc. by nathancahill on Tuesday July 04, 2017 @03:14PM (#14697700)
Expired can happen clientside, just check the timestamp. Revoked would be a short blacklist that lasts the duration of the session, once a token is expired it no longer has to be revoked.

But I'm also curious how a revoked list would be handled with this service.

Re:Show HN: OAuth microservice for FB, Twitter, etc. by hultner on Wednesday July 05, 2017 @05:50AM (#14701076)
That's only true if you do not allow for long running sessions which are commonplace today. And it still requires a lookup every time to see if a particular session is blacklisted.

From what I could grasp there's no mechanics for blacklists/revocations in the current implementation of this service.

Re:Show HN: OAuth microservice for FB, Twitter, etc. by Gys on Tuesday July 04, 2017 @09:24AM (#14695701)
Could be useful in my current project, but I need LinkedIn also.
Re:Show HN: OAuth microservice for FB, Twitter, etc. by fitz2001 on Tuesday July 04, 2017 @10:48AM (#14696148)
Re:Show HN: OAuth microservice for FB, Twitter, etc. by fitz2001 on Friday July 07, 2017 @11:15AM (#14718959)
linked in is now available and demo is online.

https://github.com/lipp/login-with/pull/31

Re:Show HN: OAuth microservice for FB, Twitter, etc. by RUTHLESS_RUFUS on Tuesday July 04, 2017 @12:24PM (#14696736)
I cannot wait to allow a bazillion fake Twitter and FB accounts from the Eastern Bloc countries to pour into my website and bigly MAGA. Thanks, social sign-on!
Re:Show HN: OAuth microservice for FB, Twitter, etc. by michaelmior on Tuesday July 04, 2017 @01:52PM (#14697255)
What's stopping people from creating fake accounts without social logins?
Re:Show HN: OAuth microservice for FB, Twitter, etc. by RUTHLESS_RUFUS on Tuesday July 04, 2017 @02:01PM (#14697323)
Administrators and community moderation who pay attention to their own access logs rather than ambiguous Facebook Review Teams who look the other way.
Re:Show HN: OAuth microservice for FB, Twitter, etc. by tudorconstantin on Tuesday July 04, 2017 @04:22PM (#14698052)
It's much easier for a spammer to get through your own implementation of spam filtering than through Facebook's or Google's.

Do you think you can implement automatic ip black listing, phone confirmation and better spammy account categorizers based on common spam signals than the big players, who have dedicated research teams working on this? I know I can't and even if I could, I'd rather spend my dev time on tasks related to the core business.

Re:Show HN: OAuth microservice for FB, Twitter, etc. by michaelmior on Tuesday July 04, 2017 @02:53PM (#14697591)
There's nothing stopping admins or mods from policing people who happen to use social login.
Re:Show HN: OAuth microservice for FB, Twitter, etc. by RUTHLESS_RUFUS on Tuesday July 04, 2017 @02:55PM (#14697605)
Except that they don't.

Account identity and authentication being outsourced to Facebook means your community maintainers don't get to notice the fact that those 100 MAGA-spouting dimwits are from Romania. They don't get that information in the first place.

Re:Show HN: OAuth microservice for FB, Twitter, etc. by aisofteng on Tuesday July 04, 2017 @09:04PM (#14699334)
I don't see how this comment is in any way useful, insightful, or constructive here.