markbates / goth

Package goth provides a simple, clean, and idiomatic way to write authentication packages for Go web applications.
https://blog.gobuffalo.io/goth-needs-a-new-maintainer-626cd47ca37b
MIT License
5.2k stars 566 forks source link

Add reddit provider and session #523

Closed ccaneke closed 8 months ago

ccaneke commented 9 months ago

Information on reddit oauth2 can be found here.

ccaneke commented 9 months ago

The unit test for the provider github.com/markbates/goth/providers/vk is failing. It looks like a simple fix. Can I fix it myself or would you prefer the author fixes it?

Edit: My apologies, it was the unit test for wechat that was failing.

techknowlogick commented 9 months ago

@ccaneke If you are able to fix it that would be appreciated. Thanks 🙏 Feel free to do it in this PR or another

ccaneke commented 9 months ago

@ccaneke If you are able to fix it that would be appreciated. Thanks 🙏 Feel free to do it in this PR or another

I fixed the failing wechat test. All tests should now pass. For some reason, the assertion a.Equal mixed up the expected and actual results. So I swapped them.

ccaneke commented 9 months ago

@techknowlogick please can you take a look at the latest error. It says:

Error: providers/reddit/reddit.go:108:15: undefined: io.ReadAll

I'm not sure why this is happening.

techknowlogick commented 8 months ago

I'm not sure why this is happening.

It's likely due to go1.15 not having the functions in io, but still having them in io/ioutil. A deprecation may be needed of go 1.15, but testing this locally it works so I'll merge it.

Thanks again for the PR, plus also a thanks for fixing the unrelated tests :)

ccaneke commented 8 months ago

I'm not sure why this is happening.

It's likely due to go1.15 not having the functions in io, but still having them in io/ioutil. A deprecation may be needed of go 1.15, but testing this locally it works so I'll merge it.

Thanks again for the PR, plus also a thanks for fixing the unrelated tests :)

Thanks for explaining, that makes perfect sense, ioutils functions recently got moved to io.

My pleasure, I hope to contribute more in anyway I can.

Celarye commented 1 week ago

It seems like the README got never updated to include Reddit in the Providers list? Or is it not functional at this moment?