diff --git a/packages/authentication-oauth/src/strategy.ts b/packages/authentication-oauth/src/strategy.ts index 1a2358872f..86bdef0b63 100644 --- a/packages/authentication-oauth/src/strategy.ts +++ b/packages/authentication-oauth/src/strategy.ts @@ -103,7 +103,8 @@ export class OAuthStrategy extends AuthenticationBaseStrategy { ...params, query }); - const [ entity = null ] = result.data ? result.data : result; + + const [ entity = null ] = Array.isArray(result) ? result : result.data debug('findEntity returning', entity); diff --git a/packages/feathers/index.d.ts b/packages/feathers/index.d.ts index 33c1eda184..1e90c6acbb 100644 --- a/packages/feathers/index.d.ts +++ b/packages/feathers/index.d.ts @@ -205,6 +205,22 @@ declare namespace createApplication { } interface ServiceOverloads { + /** + * Retrieve all resources from this service. + * + * @param params - Service call parameters {@link Params} + * @see {@link https://docs.feathersjs.com/api/services.html#find-params|Feathers API Documentation: .find(params)} + */ + find? (params: Params & { paginate: false}): Promise + + /** + * Retrieve all resources from this service. + * + * @param params - Service call parameters {@link Params} + * @see {@link https://docs.feathersjs.com/api/services.html#find-params|Feathers API Documentation: .find(params)} + */ + find? (params?: Params): Promise> + /** * Create a new resource for this service. *