aws-amplify / amplify-ui-swift-liveness

This repository offers a UI component for Amazon Rekognition Face Liveness, enabling developers to ensure that only authentic users, and not bad actors using spoofs, can access their services.
https://ui.docs.amplify.aws/swift/connected-components/liveness
Apache License 2.0
10 stars 25 forks source link

Error "No plugins added to Authentication category." #183

Closed behzod-rajabov closed 1 day ago

behzod-rajabov commented 1 day ago

Describe the bug

I created Amplify with ClientID and clientSecret, and added auth category to it. And I added the generated amplifyconfiguration.json file to the Project. And I configured Amplify in AppDelegate as follows:

Amplify.Logging.logLevel = .debug
        do {
            try Amplify.add(plugin: AWSPredictionsPlugin())
            try Amplify.configure()
            print("Amplify successfully configured")
        } catch {
            print("Failed to initialize Amplify with \(error)")
        }

But I am getting the following error: image

Steps To Reproduce

===

Expected behavior

===

Swift Liveness Version

1.3.3

Xcode version

16.1 (16B40)

Relevant log output

No response

Is this a regression?

Yes

Regression additional context

No response

OS Version

iOS 18.1

Device

iPhone 16 Pro Max

Specific to simulators

No response

Additional context

No response

vincetran commented 1 day ago

Hi @behzod-rajabov, Looking at the code snippet you provided, it looks like you added the Predictions plugin but not the Auth plugin:

Amplify.Logging.logLevel = .debug
        do {
            try Amplify.add(plugin: AWSPredictionsPlugin())
            try Amplify.add(plugin: AWSCognitoAuthPlugin()) // You need to add this here
            try Amplify.configure()
            print("Amplify successfully configured")
        } catch {
            print("Failed to initialize Amplify with \(error)")
        }
behzod-rajabov commented 1 day ago

Hi @vincetran. Yes you are right. I forgot to add the Auth plugin as you said. Thanks for your help.

github-actions[bot] commented 1 day ago

⚠️COMMENT VISIBILITY WARNING⚠️

Comments on closed issues are hard for our team to see. If you need more assistance, please open a new issue that references this one. If you wish to keep having a conversation with other community members under this issue feel free to do so.