-
Notifications
You must be signed in to change notification settings - Fork 195
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
AWS Amplify v2 fetchAuthSession returns isSignedIn False in Swift : After migrating Amplify v1 to v2 in iOS Swift, on app reopening #3604
Comments
@anand-OSM Thanks for submitting the issue. We will try to reproduce the issue and investigate further. |
Anything on this @phantumcode |
@anand-OSM I have not been able to reproduce this issue. I was able to fetch a signed in auth session after migrating from Amplify V1 to Amplify V2. Closing and re-opening the app several times also resulted in a successful auth session on each app reopening. Can you specify what version of Amplify V1 are you migrating from? If possible, are you able to reproduce the issue with a basic test app or sample app that demonstrates your code usage? |
@phantumcode its v1.30.9 |
The issue is being discussed on discord with the customer. We will post an update here once we have more data to share. |
During a customer call it was seen that aws-sdk-ios and Amplify V2 were being used together, which was corrupting the keychain. Following is a way you can import a services from the AWS SDK for Swift when using Amplify V2. Example use case where we will import SNS service: Steps to import SNS Client from the AWS SDK For Swift:
|
This issue is now closed. Comments on closed issues are hard for our team to see. |
Describe the bug
After migrating AWS Amplify v1 to v2 in our Swift App, we've encountered a persistent issue with the session. Despite successful config and login, I think the authentication state is not preserved upon reopening the app.
I am using Swift and SwiftUI and Cognito HostedUI for login/Signup
Amplify.Auth.fetchAuthSession
always returnsisSignedIn
false
Below is my simple code :
Configure Amplify
Fetch session
Steps To Reproduce
Expected behavior
Once signed in whenver open app
Amplify.Auth.fetchAuthSession
should always returnsisSignedIn
false
Amplify Framework Version
2.27.1
Amplify Categories
Auth
Dependency manager
Swift PM
Swift version
5
CLI version
12.10.1
Xcode version
15.2
Relevant log output
Is this a regression?
Yes
Regression additional context
I was using Amplify v1 and it was working fine, persisted the session and return true untill I log out.
When I migrated from V1 to V2, I started facing this issue.
Platforms
iOS
OS Version
iOS 16 & iOS 17
Device
iPhone 8 and above
Specific to simulators
No response
Additional context
No response
The text was updated successfully, but these errors were encountered: