You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If we create multiple instances of PowerAuth object with the same instance identifier then all can provide functionality on top of the same underlying instance of native SDK. This is due to fact, that PowerAuth is just a thin envelope containing instanceId internally to point to the right native object.
Unfortunately, this is not valid for configuration properties available in PowerAuth class. The configuration properties are updated in configure() method so it will be available only in one instance. For example:
constsdk1=newPowerAuth('default')constsdk2=newPowerAuth('default')console.log(`sdk1 is configured = ${awaitsdk1.isConfigured()}`)// falseconsole.log(`sdk2 is configured = ${awaitsdk2.isConfigured()}`)// falsesdk1.configure(configuration)console.log(`sdk1 is configured = ${awaitsdk1.isConfigured()}`)// trueconsole.log(`sdk2 is configured = ${awaitsdk2.isConfigured()}`)// trueconsole.log(`sdk1 is configured = ${sdk1.configuration}`)// somethingconsole.log(`sdk2 is configured = ${sdk2.configuration}`)// null
This is normally not a big deal, but can be confusing for developers that create multiple PowerAuth instances by accident, or for any purpose. So, this is still a nice to have enhancement.
The text was updated successfully, but these errors were encountered:
If we create multiple instances of
PowerAuth
object with the same instance identifier then all can provide functionality on top of the same underlying instance of native SDK. This is due to fact, thatPowerAuth
is just a thin envelope containinginstanceId
internally to point to the right native object.Unfortunately, this is not valid for configuration properties available in
PowerAuth
class. The configuration properties are updated inconfigure()
method so it will be available only in one instance. For example:This is normally not a big deal, but can be confusing for developers that create multiple PowerAuth instances by accident, or for any purpose. So, this is still a nice to have enhancement.
The text was updated successfully, but these errors were encountered: