I am using the developer WebApp Builder beta 2.0 and have an app built that uses a web map that is part of a private group on our AGOL site. When I download the app and deploy it to our web server and try to load it, I am prompted to sign in to view the web map. When I click OK to do so, I'm getting an invalid redirect error, show below.
Any ideas what is causing this or how to fix it would be appreciated.
Thanks!
I am having the same problem. Did you figure it out?
First of all, in our case, the app is hosted on our web server, not ArcGIS Online, so if your app is hosted on AGOL, the solution may be different.
To get the app to work, the app needs to registered on your ArcGIS Online site and the registered AppID you receive needs to be correlated to your app.
These are the steps I took:
1) You need to add a web mapping application item to your AGOL site pointing to your app
2) Once added, you need to register the app. For the Redirect URI, I put in the URL to the web app, which again, in our case is hosted locally on our web server, not on AGOL. From what I've read, the Redirect URI is the URL you'll be redirected to once a successful login is made. When registered, you'll get an AppID.
3) Since our app is hosted on our web server, the AppID can then be entered into the config.json file at the root of the application folder (around line 12 of our config.json file).
Once this was all in place, when I hit the URL of the app, I was prompted to login to AGOL. Once a successful login is made, a token is generated and you won't have to login again...unless you clear your browser cache.
Hope this helps...and I hope I've explained it correctly. Anyone can feel free to correct me if needed.