@falconeta/capacitor-aws-amplify 0.0.12 → 0.0.13

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -7,6 +7,8 @@ import AWSMobileClient
7
7
 
8
8
  @objc public class AwsAmplify: NSObject {
9
9
  private let TAG = "[Capacitor AwsAmplify]"
10
+
11
+ private var isLoaded = false
10
12
  // static public let instance = AwsAmplify()
11
13
 
12
14
  // private let sessionSubject = BehaviorSubject<Optional<AuthSession>>(value: nil)
@@ -256,6 +258,11 @@ import AWSMobileClient
256
258
 
257
259
  let ampConfig: AmplifyConfiguration = AmplifyConfiguration.init(auth:auth)
258
260
  do {
261
+ if (isLoaded) {
262
+ onSuccess()
263
+ return
264
+ }
265
+ isLoaded = true
259
266
  try Amplify.add(plugin: AWSCognitoAuthPlugin())
260
267
  try Amplify.configure(ampConfig)
261
268
  print("\(self.TAG) Amplify configured with auth plugin")
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@falconeta/capacitor-aws-amplify",
3
- "version": "0.0.12",
3
+ "version": "0.0.13",
4
4
  "description": "plugin that handle amplify features",
5
5
  "main": "dist/plugin.cjs.js",
6
6
  "module": "dist/esm/index.js",