turnage / graw

Golang Reddit API Wrapper
MIT License
288 stars 49 forks source link

Create bot using existing OAuth2 token #48

Open thomas-tharp opened 5 years ago

thomas-tharp commented 5 years ago

After browsing how the underlying authentication mechanism works in this library, it does not appear that there is a way to get a Bot (or Lurker or Scanner) without an actual username and password.

In my use case, users have already authenticated my application, and I just store the retrieved tokens and refresh them as needed.

Would you be interested in a PR that adds the ability to create an authenticated client using an existing OAuth2 token, skipping the internal authorization request?

dillonmabry commented 4 years ago

I would like to see the same. Great package btw.

turnage commented 4 years ago

Sorry about the very late reply. I am interested in such a PR if anyone would like to write it.

thomas-tharp commented 4 years ago

This is what we're using internally. Let me know if it needs anything else to get it merged in.