Answer the question
In order to leave comments, you need to log in
How is authorization done?
Tell me something like this. In the settings of Adobe Lightroom plugins, for example, in the same plugin for Flickr, there is an authorization button. When you click on it, the user opens a page in the browser, where, after successful authorization, the authorization data is somehow copied to the plugin, and the plugin is authorized. What is the mechanism?
I looked at the plugin API. Functions for working on http are severely curtailed there - post, get requests, and open url in a browser. At the same time, the function of opening the site in the browser does not return anything.
How does the plugin know that I am logged into the site in the browser and get the required token?
Answer the question
In order to leave comments, you need to log in
I asked myself - I answer myself.
The fastest way is to generate a token on the plugin side, and we send the user to the authorization page with this token in the url.
On the remote server side, if authorization is successful, then the token is marked as valid, and then all actions are performed using this token. The plugin simply makes an asynchronous request using this token, and if the token is valid, then it receives information about the user, and the status in the plugin changes to "user authorized".
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question