“OAuth2 spec is long and complex”.<p>One of my 20% projects at Google was addressing this very problem. I built an OAuth2 and OpenID-Connect client library for the Web that is written in TypeScript. The library supports web apps, Node.js CLI & Electron based apps.<p><a href="https://github.com/openid/AppAuth-JS" rel="nofollow">https://github.com/openid/AppAuth-JS</a><p>There are sister projects for Android and iOS as well. Hopefully, OAuth2 complexity will not prevent you from consuming a service going forward.