Let’s assume I have a Web Service SmartApp providing several REST API. I want to use this from my standalone iOS application (which has no backend connection at all).
I have a question regarding the Oauth2 Login:
If I understand well, first time, when the user clicked the “Connect Smartthings” button in my iOS app, I need to open a UIWebView to display the SmartThings Login Page the user to be able to login, install my Web Service SmartApp, specify the devices to which my system is being granted access. But the HTTP request to get the authorization code require a “redirect_uri” specified. But I have no external server, my app is a standalone app… How can my iOS app get back the authorization code? Can I start an HTTPServer on my iOS app and specify its URL as “redirect_uri”?
Is there any available source example how to solve this?
May it possible to avoid the usage of a WebView somehow? I assume not (the user must go through the process to install my Web Service SmartApp and add permissions, right?)
Thank you for your help!