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

Calling User#linkCredentials with the email of a non-existing user or wrong password never surface error #6586

Closed
kraenhansen opened this issue Apr 4, 2024 · 1 comment · Fixed by #6588

Comments

@kraenhansen
Copy link
Member

How frequently does the bug occur?

Always

Description

When a request failed with a 401, we would try to refresh the session and retry unconditionally, in the case of a link credentials request, this heuristic is too simple as it resulted in an endless loop of session refreshes instead of surfacing the error to the user.

Stacktrace & log output

No response

Can you reproduce the bug?

Always

Reproduction Steps

async function handleLinking() {
  const user = await app.logIn(Credentials.anonymous());
  const emailPasswordCredentials = Credentials.emailPassword("[email protected]", "v3rys3cur3"); // This user doesn't exist or the password is incorrect
  await user.linkCredentials(emailPasswordCredentials);
}

Version

2.0.0

What services are you using?

Atlas App Services: Functions or GraphQL or DataAPI etc

Are you using encryption?

No

Platform OS and version(s)

N/A

Build environment

No response

Cocoapods version

No response

Copy link

sync-by-unito bot commented Apr 4, 2024

➤ PM Bot commented:

Jira ticket: RJS-2789

@github-actions github-actions bot locked as resolved and limited conversation to collaborators May 4, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant