[SteemWatch] You Can Sign Up Using Reddit Now!

in #steemwatch8 years ago (edited)

It is now possible to sign up for SteemWatch using Reddit so that people that created their Steemit accounts using Reddit can do the same for SteemWatch.


Login Providers

How It All Happened

It all started this morning when I was like yeah, let's just do Reddit quickly. Hahahah, how wrong I was :-)

When doing OAuth2, you basically redirect the user to the login provider, where they authenticate. Then you get a code that you exchange for an access token that you can use to access Reddit API on behalf of the authenticated user.

The funny part is, to get the access token you have to send an HTTP request. Nothing too amazing. The cool part is that Reddit is limiting HTTP requests by User-Agent HTTP header, so any common library being used by multiple people is basically blocked. You need to set your own unique string or your OAuth request.

But of course, nobody wants to be sending these HTTP requests manually. There are libraries for OAuth2! Well, but they don't allow you to set custom User-Agent header for the request, which means, yeah, that you will end up actually implementing OAuth2 yourself using raw HTTP requests. Totally not cool.


Headshot

If that is not enough, when you get the user profile from Reddit, the verified email address is not there. Reddit just decided to not give it out, although Facebook, Google, GitHub and other do that. And of course, I based the user identification on email addresses. Which meant that I had to extend the authentication framework in SteemWatch. Not cool, again.

Bottom Line

You can either use Reddit XOR any of the remaining providers. When you use Facebook and then Google and the email addresses for these accounts are the same, SteemWatch will find the same user. But there is no email address for Reddit. So using Reddit and then using Facebook will log you into different SteemWatch accounts.

I might fix this in the future, but it is not going to be that trivial.

If you are masochistic, feel free to check the implementation.

Sort:  

I'm glad Reddit was an option as I abandoned Facebook and destroyed my account there over 2 years ago. horay!

I wish they would enable e-mail authentication or even SMS (if you dont care for privacy) in the future. Spam is an issue, but not everyone has social media accounts , think of the elderly for example.

I think the best way would be just to create a terminal you can run independently, no account necessary.

I might get to it, yes.

Nice, you were quick in implementing my suggestion about adding Reddit :)

Yeah, but now I understand why I didn't want to do it :-)

Hehe, sorry for the trouble... didn't know it will be hard implementing it :)

Thanks for adding that feature @void :)

Let's suck the life force from Reddit. (Dark laugh)

I am in, totally :D

Coin Marketplace

STEEM 0.35
TRX 0.12
JST 0.040
BTC 70884.24
ETH 3570.27
USDT 1.00
SBD 4.76