-
Notifications
You must be signed in to change notification settings - Fork 585
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
user.linkCredentials
doesn't update user identities
#5732
Comments
@thecoorum Thank you for reporting. I believe your observation is correct. You can try to call |
Hey @kneth! Thanks for quick response, unfortunately this doesn't help. I'm logging await user.linkCredentials(credentials)
await app.logIn(credentials)
await user.refreshCustomData() The combination like this also doesn't work for me await user.linkCredentials(credentials)
await user.refreshCustomData()
await app.logIn(credentials) |
@kneth from the other side I was able to achieve desired behavior by checking if the screen that shows identities is focused and refreshing customer data if so. But I'm aware that I can easily reach API requests limit using this technique. In the issue I described above user is signing in on another screen and then redirected to the settings where he/she can see current email. |
Hi, I don't know if you have found the solution or not. I was facing the same issue today, my workaround is, after I call linkCredentials function, I reset the navigation to user's profile page (I'm using React-Navigation) by calling navigation.reset function, then, the page will rerender, and I'm able to get the latest user's profile by assigning app.currentUser to the user variable. |
Apparently, when you create the new credential the tolen changes. So, before try to link the credentials you should This way worked for me (Flutter, but probably the same issue):
|
How frequently does the bug occur?
Always
Description
While using Realm in React Native with
@realm/react
I noticed an issue with linking credentials. I'm registering a new user via email and password. As soon as the account confirmed the user can log in and it will try to link this credentials with initial anonymous user. This is done likeIf I log
user.identities
I will not see new identity as soon as email and password identity is linked. The new identity will appear after app reload, thoughStacktrace & log output
No response
Can you reproduce the bug?
Always
Reproduction Steps
Not really sure if the last step is required
Version
11.8.0
What services are you using?
Local Database only
Are you using encryption?
No
Platform OS and version(s)
iOS 16.2
Build environment
No response
Cocoapods version
No response
The text was updated successfully, but these errors were encountered: