Show HN: Login with HN (Unofficially)

1
Show HN: Login with HN (Unofficially)

NOW WITH OVER +8500 USERS. people can Join Knowasiak for free. Sign up on Knowasiak.com
Read More

Leave a Reply

2 thoughts on “Show HN: Login with HN (Unofficially)

  1. Aditya avatar

    This is a smart implementation. I was worried it would be doing something uncouth like asking for your HN password or scraping some kind of unofficial API, but instead it gives you a token to embed in your public profile – so it's still scraping your profile page, but that feels like a very low-impact way of building this.

  2. Aditya avatar
    ยท January 13, 2022 at 5:36 pm

    Hey HN,

    I wanted to be able to make apps that do social login with HN so I hacked it together.

    It works like you would expect — generating a code you can put in your profile. For convenience, you can then use either TOTP or Email (if you specify both, it will default to using TOTP) to login thereafter to make things quicker (it can take up to a minute until profiles update).

    I generally wait about 5 seconds between checks of a profile, hopefully this isn't too much additional strain (especially since I expect most people to switch to something faster after the first login).

    [EDIT] Also it's night time (well morning I guess) where I am so… spinning up some more instances and I'm going to sleep.

    [EDIT2] My email is plastered all over the site, but please feel free to email me any bug reports!