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

TwoFactor service fails with typeorm #1110

Open
blessanabraham opened this issue Feb 5, 2021 · 0 comments · May be fixed by #1111
Open

TwoFactor service fails with typeorm #1110

blessanabraham opened this issue Feb 5, 2021 · 0 comments · May be fixed by #1111
Labels

Comments

@blessanabraham
Copy link
Contributor

blessanabraham commented Feb 5, 2021

Bug report

Describe the bug

When using TwoFactor with typeorm, it fails to get the two-factor service from the user object because the services attribute is an array instead of an object. See the code here

The code for the services attribute construction in typeorm is here

This is also inconsistent with the service attribute on the User in mongodb (which returns it as an object instead of an array).

System information

  • Version of accounts-js: 0.31.1
blessanabraham added a commit to blessanabraham/accounts that referenced this issue Feb 5, 2021
* Updated the `getServices` method on the `User` entity to construct
objects for the top level fields
* Added special handling for `email.verificationTokens` and
`password.reset`
* Updated tests to match the mongodb tests

Fixes: accounts-js#1110
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant