I have a magento website. Now I want to develop a mobile application for this site. So for webservice, I created a custom module. In this module, I have a controller called mobileApi. In this mobileApiController, I am writing the entire webservice function. For example, getAllProducts ().
Now, on the other hand, I want to use the magento rest api for the access token and the Secret token access. If access to the rest api is valid, then only my user controller, i.e. the mobileApiController, will return the data.
I want the system to work this way. When the application starts, the Mobile application will call a web service to authenticate the rest of the api access, and the web service will return the valid access token and Token access secret. After that, on each call to the webservice, it first checks the access for the remaining api, if the access is valid, then it serves and then serve the data, otherwise it shows an authentication error.
I designed everything and everything works fine, but the problem during App Launch, when I call the service to get the access token and access secret tokens, the magento system takes me to a page where it requests authentication,
Screenshot (step 1)
After logging in, he shows me this page.
Screenshot (step 2)
Then, if I authenticate access, then rest api will receive authentication and return the access token and access secret to the token, after which the webservice will start serving the data.
But how do I manage this authentication from the application? I need to skip these two steps (step1 and step2).
I want to call a web service to get an access token and get access to a token at the time of application launch, and immediately get a token access key and access to a token without this step 1, i.e. login authorization and step 2.
Thanks in advance.