|
|
|
|
|
by lobster_johnson
4766 days ago
|
|
I don't know what language you use, but we wrote an open-source Ruby app called Vanilla [1] that acts as a generic OAuth provider. Maybe it can be useful to you, either directly or as an example. Vanilla is a Sinatra app, exposes a simple API and user database, and the UI is rendered entirely through webhooks. In other words, it's designed to be a headless system that works in concert with a real app, so that the app itself does not need to implement OAuth or indeed the core account handling. (Some parts, like the ability to sign up by verifying your phone through an SMS code, are very specific to our workflow, but it's intended to be completely generic, so those things can be changed.) That said, OAuth 2.0 is very simple to implement. It's pretty much entirely encapsulated in oauth.rb, token.rb and authorization.rb, if you want some inspiration. [1] https://github.com/bengler/vanilla |
|