I have a rails app that stores my user information and data using the Sorcery gem, and I would like to have a chrome extension I am working on, authenticate with my rails app.
I cannot seem to find any references to an API in Sorcery which would allow me to authenticate using my user database from an external source.
How do I expose my sorcery-powered rails app as an oauth server, such that I can store a key, which I can attach to my javascript application when I make an AJAX to my api.
Is it possible to do so, and/or what is the best practice for cross-site authentication? Like how should I store the authenticated user information etc?
i don’t know if sorcery supports token authentication.
devise does, and it’s really simple:
https://github.com/plataformatec/devise/wiki/How-To:-Simple-Token-Authentication-Example