Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Authentication Aws Amplify with Flutter #13382

Closed
4 of 14 tasks
Tructivity opened this issue Oct 30, 2023 · 13 comments
Closed
4 of 14 tasks

Authentication Aws Amplify with Flutter #13382

Tructivity opened this issue Oct 30, 2023 · 13 comments
Labels
auth Issues tied to the auth category of the CLI pending-triage Issue is pending triage transferred This issue was transferred from another Amplify project

Comments

@Tructivity
Copy link

Description

I have a web application that uses Cognito for authentication and it works perfectly and I want to connect Cognito to my Flutter app.

I have pulled the amplify project in the Flutter app but the configuration file has no plugins added to it. I have also added auth. amplify add auth but the configuration file remains the same. So the only possible way to add that is push as I have seen a video on YouTube.

Is there any way we can have auth added to the configuration file without pushing?

Categories

  • Analytics
  • API (REST)
  • API (GraphQL)
  • Auth
  • Authenticator
  • DataStore
  • Notifications (Push)
  • Storage

Steps to Reproduce

No response

Screenshots

No response

Platforms

  • iOS
  • Android
  • Web
  • macOS
  • Windows
  • Linux

Flutter Version

3.13.0

Amplify Flutter Version

1.5.0

Deployment Method

Amplify CLI

Schema

No response

@khatruong2009 khatruong2009 added auth Issues tied to the auth category of the CLI pending-triage Issue is pending triage labels Oct 30, 2023
@haverchuck
Copy link
Member

@Tructivity When you say you've "pulled the Amplify project in the Flutter app", what exactly do you mean? Can you provide any code samples showing how you are configuring the app?

@Tructivity
Copy link
Author

Tructivity commented Oct 30, 2023

@haverchuck "pulled the Amplify project in the Flutter app" means "Pulling backend from aws amplify to connect with the Flutter app"

@Tructivity
Copy link
Author

@haverchuck Could you help? I'm stuck in it long time

@haverchuck
Copy link
Member

@Tructivity I think this might be a good question for our Amplify CLI team. I'm going to transfer this issue to their repository to get you better help.

@haverchuck haverchuck transferred this issue from aws-amplify/amplify-flutter Oct 31, 2023
@Tructivity
Copy link
Author

@haverchuck Thanks a lot, I'm really in need to solve it

@ykethan
Copy link
Member

ykethan commented Oct 31, 2023

Hey @Tructivity, thank you for reaching out. To ensure i understand the situation, initially using the Amplify CLI, amplify pull --appId <appID> --envName dev command, you pulled the backend to a flutter app.
Then ran amplify add auth to add a auth resource, but you do not observe the aws-exports/amplifyconfiguration file with the resource?
Currently, the aws-exports/amplifyconfiguration files get updated with the resource outputs on a amplify push.

Could you provide us some additional information on your use case? Are you looking to quickly test the auth resource in your project?

@ykethan ykethan added the pending-response Issue is pending response from the issue author label Oct 31, 2023
@josefaidt josefaidt added the transferred This issue was transferred from another Amplify project label Oct 31, 2023
@Tructivity
Copy link
Author

@ykethan I want to test auth cognito in Amplify if it is working with the Flutter app or not and also to configure it correctly with amplifyconfiguration.dart But amplify push is needed for plugins to be added into amplifyconfiguration.dart so to achieve that amplify push is necessary for me but on the other hand, I don't want to edit the amplify backend from Flutter because I am afraid that it might make changes to the web configuration which is working perfectly with amplify already.

@github-actions github-actions bot removed the pending-response Issue is pending response from the issue author label Oct 31, 2023
@haverchuck
Copy link
Member

@Tructivity If you want to use Amplify Flutter without using the Amplify CLI, you can create your own config file using this documentation.

@Tructivity
Copy link
Author

@haverchuck Thanks, we have to find out appclient ids and pool ids to add it manually. How we will find appClientId and poolId there?

ids

@ykethan
Copy link
Member

ykethan commented Oct 31, 2023

@Tructivity we can find this attributes in the user pool and identity you may have created on the AWS Console. Please refer to the document providing this information on user pool clients: https://docs.aws.amazon.com/cognito/latest/developerguide/user-pool-settings-client-apps.html

@ykethan ykethan added the pending-response Issue is pending response from the issue author label Oct 31, 2023
@Tructivity
Copy link
Author

@haverchuck @ykethan Thanks a lot for helping in this situation, it worked.

@github-actions github-actions bot removed the pending-response Issue is pending response from the issue author label Nov 5, 2023
@ykethan
Copy link
Member

ykethan commented Nov 6, 2023

Glad to hear you were able to mitigate the issue. Closing the issue.

@ykethan ykethan closed this as not planned Won't fix, can't repro, duplicate, stale Nov 6, 2023
Copy link

github-actions bot commented Nov 6, 2023

⚠️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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
auth Issues tied to the auth category of the CLI pending-triage Issue is pending triage transferred This issue was transferred from another Amplify project
Projects
None yet
Development

No branches or pull requests

5 participants