wrobins / cordova-plugin-msal

Use the newest Microsoft MSAL library in your Cordova-based project!
Apache License 2.0
23 stars 63 forks source link

Supplying CLIENT_ID at runtime #85

Closed rudi-minty closed 2 years ago

rudi-minty commented 2 years ago

Is it possible to not supply the CLIENT_ID when adding the plugin but rather at runtime when the plugin is initialised? Our app needs the ability to link to a clients own azure tenant, which cannot be supplied at development time.

wrobins commented 2 years ago

Hi @rudi-minty,

I've seen this request a few times, and I would indeed like to support that as it would be very useful. At first, the Android MSAL library did not support doing that, as the Client ID had to be inserted into the app manifest at compile time. It's always been my philosophy that Cordova plugins should function as identically as possible across platforms, so I've tried to make a standard interface that functions the same so you, as the developer, don't have to care about what's going to happen on one device or another. That said, I looked recently and it looks like the Android MSAL library has gotten quite a few similar requests, and they decided to add that support a few months ago. I will update this plugin soon with support for setting the Client ID at runtime.

I hope that helps - and definitely start looking for that support here within the next few weeks.

rudi-minty commented 2 years ago

Thats great news, thanks @wrobins!

rudi-minty commented 2 years ago

Good day @wrobins, I've gone through the commits but dont see this change yet, just wanted to check in to make sure I did not miss it. Hope to hear from you soon.