ShelterTechSF / askdarcel-api

Backend of the "Ask Darcel" app.
GNU General Public License v3.0
8 stars 24 forks source link

Validate auth0 token #725

Closed schroerbrian closed 1 year ago

schroerbrian commented 1 year ago

I lifted most of this code from Auth0's Rails tutorial here. This can be merged in as is, given it isn't being used yet to lock down any of our endpoints. The Secured#authorize method can be included in any given controller as a before_action (with specific controller methods listed out as needed) to restrict access. Let me know if there's any feedback/requests.