-
Notifications
You must be signed in to change notification settings - Fork 6
Argument of type '{ required: PermissionKeys[]; }' is not assignable to parameter of type 'string | AuthenticationMetadata' #13
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
Comments
did you solved? |
I managed to get it working by following the code in loopback4-example-shopping.
|
I tried the above method but in my case currentUser = {[securityId]: user.id, name: user.name, roles: user.permissions}; in this line roles is undefined, my name is valid I checked but this roles keep coming undefined |
can anyone tell me how to resolve this? |
@authenticate({strategy: 'jwt', options: {reqired: [PermissionKey.Create]}}) |
A recent update for the library has changed the interface for What has worked for me was editing the
then changed this line There might be a cleaner solution with a correct type of formating but this has worked for me |
@b1n1yam It would be great if u create a PR I will merge it |
Hello,
There is an issue with the last update of lb4, impossible to build.
Argument of type '{ required: PermissionKeys[]; }' is not assignable to parameter of type 'string | AuthenticationMetadata'
To test:
lb4 update
npm audit fix
npm run clean; npm run build
The text was updated successfully, but these errors were encountered: