Closed
Description
x/oauth2
has some churn due to security issues and changes in dependencies.
However the dependencies of x/oauth2
are not so set in stone:
- Heavy
cloud.google.com/go
is required only for fetching GCE metadata. However the package for fetching metadata is pretty self-contained and can be pulled in. - Heavy
google.golang.org/appengine
is required only for Gen1 AppEngine. I haven't investigated how much code is actually used.
After removal of these two dependencies, the rest is trivial: (removed in e07593a)x/net
is used in one place to save 5 lines of code.google/go-cmp
is used in one test to save 11 lines of code.
I currently maintain a dependency-less version of x/oauth2
at https://github.com/ridge/oauth2. Here are the patches: master...ridge:oauth2:master
The only feature loss is AppEngine Gen1 environment: for expediency I cut it out instead of figuring out if it can be retained.