Post A3wlAtLNsUbXpPbXVo by kai@pl.ajin.la
 (DIR) More posts by kai@pl.ajin.la
 (DIR) Post #A3wjA1L0TI8qQHsv44 by sean@social.deadsuperhero.com
       2021-02-04T23:58:54.025112Z
       
       0 likes, 0 repeats
       
       Kind of wondering what the best approach to supporting OAuth in a Vue app would be. Is it better to just kind of "roll your own", or is there a good recommended library worth getting behind?I'm gonna start on the API reorganization tonight, and just focus on making public stuff work, but I'm curious about how I'll be handling this next big step.
       
 (DIR) Post #A3wkVZQ53E48A4678a by kai@pl.ajin.la
       2021-02-05T00:09:50.289017Z
       
       0 likes, 0 repeats
       
       @sean I can't believe you are just now getting to oauth. I felt like I couldn't do a damn thing without it.
       
 (DIR) Post #A3wkVa9SKWMUQnKLrc by sean@social.deadsuperhero.com
       2021-02-05T00:13:58.844444Z
       
       0 likes, 0 repeats
       
       @kai to be fair, this is kind of my first time doing any sort of API client. The furthest I've gotten before was maybe doing endpoint calls with Postman, and reading the JSON output.
       
 (DIR) Post #A3wlAtLNsUbXpPbXVo by kai@pl.ajin.la
       2021-02-05T00:18:43.923577Z
       
       1 likes, 0 repeats
       
       @sean my plan is that a mastodon client would be my first software development project *ever* 😅 even if it's just posting a hard coded status update from the command line.But oauth seems like a lot.I think Pleroma still supports basic auth so I'm hoping to use that for now 😅
       
 (DIR) Post #A3wmv8vaMy7ZR59i9w by y0x3y@hackers.town
       2021-02-05T00:37:34Z
       
       1 likes, 0 repeats
       
       @sean i think in general auth is best handled by a library
       
 (DIR) Post #A3wmxRlbIW6ORWaFwu by sean@social.deadsuperhero.com
       2021-02-05T00:41:28.645753Z
       
       0 likes, 0 repeats
       
       @y0x3y this seems to be the general consensus in the replies I'm getting so far.
       
 (DIR) Post #A3wnYzaQWGQA31GCjw by NicolasConstant@social.nicolas-constant.com
       2021-02-05T00:47:01.517831Z
       
       1 likes, 0 repeats
       
       @sean OAuth in Mastodon is pretty basic (no token renewal, no refresh token, etc) so it's quite easy to handle manually. I tried libs before, was too often hacky to my taste, but maybe I didn't run into the good ones at that time.
       
 (DIR) Post #A3wnfSpsgU3AV4Zi08 by sean@social.deadsuperhero.com
       2021-02-05T00:49:25.667865Z
       
       0 likes, 0 repeats
       
       @NicolasConstant admittedly, I'm at a loss on where to begin here. It doesn't seem like manually writing basic requests would be hard? Maybe I could just do that, and swap it out with something formal and elegant later?
       
 (DIR) Post #A3wtIeZ7VUh5wZF1eK by django@social.coop
       2021-02-05T00:54:27Z
       
       1 likes, 0 repeats
       
       @sean I would say use a lib, but the problem with the libraries I tested, is they were setup for specific providers, or hard-coding 1 custom provider. I never figured out how to abstract this part for an instance url screen. Hopefully this has changed but, you might have to role your own!
       
 (DIR) Post #A3wtKMSNo0HwMMu8rg by NicolasConstant@social.nicolas-constant.com
       2021-02-05T00:52:40.707751Z
       
       1 likes, 0 repeats
       
       @sean if you're talking to an authenticated API you will not have the choice but to implement a Oauth process in your app. Sure you can test things on the side to understand them, but once in the app you will need this workflow (create and app on the API, redirect user so that he connects, handle his returns, echange code for the token, etc).