-
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
visionOS Unable to fetch/update AuthUserAttribute #3529
Comments
@LarissaKim Thanks for raising the issue. From the steps that you listed out, I didn't see you performing a Sign In step. To fetch or update user attributes, the user needs to be signed in first. If the user is signed in and you are seeing the issue, would you be able to share the error output and verbose logs when the issue happens.
|
@harsh62 Yes, that would be because when I attempt to |
This is really strange..
Amplify doesn't have this kind of a feature built in.
Did you ever in your testing try the sign In API and got actually signed in (with an app that has the same bundle identifier). This could result in credentials getting persisted in the keychain and Amplify thinking a user is already signed in. Could you share some logs, when running API's? |
@harsh62 I've actually been in the process of verifying if After creating the new user, I stopped the simulator then re-ran the app. I was able to successfully sign in to the app, and also successfully completed I'm trying to verify if force signing out then signing back in resolve the issue, at least for the sign in flow. Will update with logs shortly. |
@LarissaKim The Amplify session is persisted across app launches, and would only be removed once sign out is called. It feels like your use case can utilize the
|
@harsh62 I'll try that out and see if it works for the sign-up flow as well. Curious that the user is automatically signed in during Would |
As I said earlier, confirmSignUp will not automatically sign in the user. Amplify doesn't have a feature like that. If that is happening, I would be curious to see the verbose logs and observe what is really happening. Hub events are resultant of App initiated operations. Hub events won't be triggered on app launches. |
@hard62 Thanks for the clarification on the Hub events. Interestingly, the issue has resolved itself. I no longer get the The only thing that was changed was adding the suggested I will re-open the issue with logs should the issue reappear. Thank you for your time. |
|
Describe the bug
I'm able to use
Amplify.Auth.signUp
andAmplify.Auth.confirmSignUp
to create a new user in a Cognito User Pool with email as the only sign-in option enabled. I can see the user is created, and the email verified in the AWS Console.However, calling
Amplify.Auth.fetchUserAttributes
orAmplify.Auth.update(userAttribute: AuthUserAttribute)
results inAuthError: User does not exist.
I have Keychain Sharing enabled in Signing & Capabilities.
I'm using a Cognito User Pool that wasn't created with Amplify. I have the PoolId, AppClientId, Region, and authenticationFlowType values specified in the
amplifyconfiguration.json
file.Steps To Reproduce
Expected behavior
I expected to be able to fetch user attributes for the authenticated user from the Cognito User Pool. I also expect to be able to update custom user attributes for the authenticated user in the Cognito User Pool.
Amplify Framework Version
visionos-preview (61994b9)
Amplify Categories
Auth
Dependency manager
Swift PM
Swift version
5.9.2
CLI version
N/A
Xcode version
Version 15.3 beta 2 (15E5188j)
Relevant log output
No response
Is this a regression?
No
Regression additional context
No response
Platforms
visionOS (Preview)
OS Version
visionOS 1.0 / visionOS 1.1
Device
Apple Vision Pro (only using simulator at the moment)
Specific to simulators
Apple Vision Pro
Additional context
No response
The text was updated successfully, but these errors were encountered: