I want to use Imgur API in a chrome extension. The authentification response from user's input is sent to a "redirect url" set up in my application profile on the imgur web page.
How can I set that "redirect url" to point to the chrome browser extension of a user ?
I see only the heavy solution of setting up a tiny server to keep track of my users' tokens :
- My extension checks for an imgur token : if found, start extension workflow, else go to step 2.
- My extension asks the imgur api for its authentification form.
- the user fills the form, which is self-managed, and the form sends back its username/password to the imgur server.
- The Imgur server sends a query request containing the token to the 'redirect-url' specified.
- This 'redirect url' is my server url and it retrieve the token.
- [no idea how to do this step] the server and the extension exchange and the extension retrieves at least the precious token.
- With that token, the extension can at least display imgur pictures.
Their documentation mentions localhost as a possible url redirect. I am digging in this general direction but it fails to make sense to me : is seems to be more like about local test for developer than the answer I am looking for.
Thanks for any input.