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

Attempting to getUser for a migrated user results in UserNotFound exception #299

Open
stocks29 opened this issue Aug 29, 2022 · 0 comments

Comments

@stocks29
Copy link
Contributor

This is because the sub attribute is not populated in the access token for migrated users, so this lookup fails:

  const user = await userPool.getUserByUsername(ctx, decodedToken.sub);
  if (!user) {
    throw new import_errors.UserNotFoundError();
  }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant