How to get current appId from within a widget?

199
1
09-26-2022 07:26 AM
ViktorSafar
Occasional Contributor II

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?

0 Kudos
1 Reply
KenBuja
MVP Esteemed Contributor

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

oauth.png

0 Kudos