We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
app.use('authentication', authentication);
src/authentication.ts:25:51 - error TS2339: Property 'apiKey' does not exist on type '{ entity?: string | null | undefined; entityId?: string | und efined; service?: string | undefined; parseStrategies?: string[] | undefined; jwtOptions?: {} | undefined; jwt?: { header: string; schemes: string; } | undefined; local?: { ...; } | undefined; oauth?: { ...; } | undefined; secret: string; authStrategies: s...'. 25 const config = this.app.get('authentication').apiKey; ~~~~~~ src/authentication.ts:43:29 - error TS2345: Argument of type 'AuthenticationService' is not assignable to parameter of type 'AuthenticationService & ServiceAddons<any, Service<any, Partial<any>, Params<Query>, Partial<Partial<any>>>>'. Type 'AuthenticationService' is missing the following properties from type 'ServiceAddons<any, Service<any, Partial<any>, Params<Query>, Partial<Partial<any>>>>': hooks, publish, registerPublisher, addListener, and 14 more. 43 app.use('authentication', authentication); ~~~~~~~~~~~~~~ at createTSError (path\\to\\project\\node_modules\\ts-node\\src\\index.ts:859:12) at reportTSError (path\\to\\project\\node_modules\\ts-node\\src\\index.ts:863:19) at getOutput (path\\to\\project\\node_modules\\ts-node\\src\\index.ts:1077:36) at Object.compile (path\\to\\project\\node_modules\\ts-node\\src\\index.ts:1433:41) at Module.m._compile (path\\to\\project\\node_modules\\ts-node\\src\\index.ts:1617:30) at Module._extensions..js (node:internal/modules/cjs/loader:1435:10) at Object.require.extensions.<computed> [as .ts] (path\\to\\project\\node_modules\\ts-node\\src\\index.ts:1621:12) at Module.load (node:internal/modules/cjs/loader:1207:32) at Function.Module._load (node:internal/modules/cjs/loader:1023:12) at Module.require (node:internal/modules/cjs/loader:1235:19) { diagnosticCodes: [ 2532, 2339, 2345 ] } [nodemon] app crashed - waiting for file changes before starting...
The API key authentication from the Feathers example should work and allow API key authentication.
The provided example doesn't compile. I've also tried the following:
interface ServiceTypes { authentication: AuthenticationService; // & ServiceAddons<any>; }
Which resolves the initial issue, but then the following error occures:
src/authentication.ts:25:51 - error TS2339: Property 'apiKey' does not exist on type '{ entity?: string | null | undefined; entityId?: string | und efined; service?: string | undefined; parseStrategies?: string[] | undefined; jwtOptions?: {} | undefined; jwt?: { header: string; schemes: string; } | undefined; local?: { ...; } | undefined; oauth?: { ...; } | undefined; secret: string; authStrategies: s...'. 25 const config = this.app.get('authentication').apiKey; ~~~~~~ at createTSError (path\to\project\node_modules\ts-node\src\index.ts:859:12) at reportTSError (path\to\project\node_modules\ts-node\src\index.ts:863:19) at getOutput (path\to\project\node_modules\ts-node\src\index.ts:1077:36) at Object.compile (path\to\project\node_modules\ts-node\src\index.ts:1433:41) at Module.m._compile (path\to\project\node_modules\ts-node\src\index.ts:1617:30) at Module._extensions..js (node:internal/modules/cjs/loader:1435:10) at Object.require.extensions.<computed> [as .ts] (path\to\project\node_modules\ts-node\src\index.ts:1621:12) at Module.load (node:internal/modules/cjs/loader:1207:32) at Function.Module._load (node:internal/modules/cjs/loader:1023:12) at Module.require (node:internal/modules/cjs/loader:1235:19) { diagnosticCodes: [ 2532, 2339 ] } [nodemon] app crashed - waiting for file changes before starting...
I'm sure I'm just missing something wrong with the TS typing, but not sure where to start.
Module versions:
NodeJS version: v20.11.0
The text was updated successfully, but these errors were encountered:
Have you tried adding that property to your configurationSchema in configuration.ts?
configurationSchema
Sorry, something went wrong.
Will give this a try when I have some time 👍
No branches or pull requests
Steps to reproduce
app.use('authentication', authentication);
stating:Expected behavior
The API key authentication from the Feathers example should work and allow API key authentication.
Actual behavior
The provided example doesn't compile. I've also tried the following:
Which resolves the initial issue, but then the following error occures:
I'm sure I'm just missing something wrong with the TS typing, but not sure where to start.
System configuration
Module versions:
NodeJS version: v20.11.0
The text was updated successfully, but these errors were encountered: