rktjmp / paperplanes.nvim

Neovim :airplane: Pastebins
MIT License
90 stars 3 forks source link

Support extracting sr.ht auth token from external source #12

Closed rktjmp closed 1 year ago

rktjmp commented 1 year ago

image

p00f commented 1 year ago

the current srht implementation needs to go anyway as it uses the legacy oauth api

rktjmp commented 1 year ago

I dont think PATs are being deprecated, just the old OAuth1 flow. OAuth2 flow isn't really compatible with us due to requiring a client (aka application) secret, and its tokens are only 24 hours. Would require each user to create their own oauth app, bunch of state book keeping for renewing tokens, etc.

I added support for hut via provider_options = { command = "hut"} (can drop the token key when using hut). The existing curl interface also remains supported.