I am building a WAB widget and want to authenticate from within the widget. I have got it working using the OAuthInfo, IdentityManager and Portal objects - but the appId is currently hardcoded to the WAB develpment app that I had set up on our Enterprise portal. The widget is expected to be added to various apps so I need to be able to get the appId from the widget's parent/current app. How do I do this?
I never found a way to do that. Instead, I had a settings page where the user added in their own appId, location, and callback html information that I then used in the authentication section of my code