@feathersjs/authentication-oauth
Advanced tools
Comparing version 5.0.9 to 5.0.10
@@ -6,2 +6,8 @@ # Change Log | ||
## [5.0.10](https://github.com/feathersjs/feathers/compare/v5.0.9...v5.0.10) (2023-10-03) | ||
### Bug Fixes | ||
- **authentication-oauth:** Move Grant error handling to the correct spot ([#3297](https://github.com/feathersjs/feathers/issues/3297)) ([e9c0828](https://github.com/feathersjs/feathers/commit/e9c0828937453c3f0a1bd16010089b825185eab6)) | ||
## [5.0.9](https://github.com/feathersjs/feathers/compare/v5.0.8...v5.0.9) (2023-09-27) | ||
@@ -8,0 +14,0 @@ |
@@ -18,4 +18,4 @@ import { HookContext, NextFunction, Params } from '@feathersjs/feathers'; | ||
export declare class OAuthError extends FeathersError { | ||
location?: string; | ||
constructor(message: string, data: any, location?: string); | ||
location: string; | ||
constructor(message: string, data: any, location: string); | ||
} | ||
@@ -22,0 +22,0 @@ export declare const redirectHook: () => (context: HookContext, next: NextFunction) => Promise<void>; |
@@ -92,6 +92,6 @@ "use strict"; | ||
}; | ||
if (payload.error) { | ||
throw new OAuthError(payload.error_description || payload.error, payload); | ||
} | ||
try { | ||
if (payload.error) { | ||
throw new errors_1.GeneralError(payload.error_description || payload.error, payload); | ||
} | ||
debug(`Calling ${authService}.create authentication with strategy ${name}`); | ||
@@ -98,0 +98,0 @@ const authResult = await this.service.create(authentication, authParams); |
{ | ||
"name": "@feathersjs/authentication-oauth", | ||
"description": "oAuth 1 and 2 authentication for Feathers. Powered by Grant.", | ||
"version": "5.0.9", | ||
"version": "5.0.10", | ||
"homepage": "https://feathersjs.com", | ||
@@ -57,9 +57,9 @@ "main": "lib/", | ||
"dependencies": { | ||
"@feathersjs/authentication": "^5.0.9", | ||
"@feathersjs/commons": "^5.0.9", | ||
"@feathersjs/errors": "^5.0.9", | ||
"@feathersjs/express": "^5.0.9", | ||
"@feathersjs/feathers": "^5.0.9", | ||
"@feathersjs/koa": "^5.0.9", | ||
"@feathersjs/schema": "^5.0.9", | ||
"@feathersjs/authentication": "^5.0.10", | ||
"@feathersjs/commons": "^5.0.10", | ||
"@feathersjs/errors": "^5.0.10", | ||
"@feathersjs/express": "^5.0.10", | ||
"@feathersjs/feathers": "^5.0.10", | ||
"@feathersjs/koa": "^5.0.10", | ||
"@feathersjs/schema": "^5.0.10", | ||
"cookie-session": "^2.0.0", | ||
@@ -72,3 +72,3 @@ "grant": "^5.4.21", | ||
"devDependencies": { | ||
"@feathersjs/memory": "^5.0.9", | ||
"@feathersjs/memory": "^5.0.10", | ||
"@types/cookie-session": "^2.0.45", | ||
@@ -78,6 +78,6 @@ "@types/express": "^4.17.18", | ||
"@types/lodash": "^4.14.199", | ||
"@types/mocha": "^10.0.1", | ||
"@types/node": "^20.7.0", | ||
"@types/mocha": "^10.0.2", | ||
"@types/node": "^20.8.2", | ||
"@types/tough-cookie": "^4.0.3", | ||
"axios": "^1.5.0", | ||
"axios": "^1.5.1", | ||
"mocha": "^10.2.0", | ||
@@ -89,3 +89,3 @@ "shx": "^0.3.4", | ||
}, | ||
"gitHead": "64ee98dadf02dac34f31e3cb7b6b10e1f7405bfa" | ||
"gitHead": "463dedcd35b16e43bc55e04df877ca82ed38dcea" | ||
} |
import { createDebug } from '@feathersjs/commons' | ||
import { HookContext, NextFunction, Params } from '@feathersjs/feathers' | ||
import { FeathersError } from '@feathersjs/errors' | ||
import { FeathersError, GeneralError } from '@feathersjs/errors' | ||
// eslint-disable-next-line @typescript-eslint/ban-ts-comment | ||
@@ -31,3 +31,3 @@ //@ts-ignore | ||
data: any, | ||
public location?: string | ||
public location: string | ||
) { | ||
@@ -125,7 +125,7 @@ super(message, 'NotAuthenticated', 401, 'not-authenticated', data) | ||
if (payload.error) { | ||
throw new OAuthError(payload.error_description || payload.error, payload) | ||
} | ||
try { | ||
if (payload.error) { | ||
throw new GeneralError(payload.error_description || payload.error, payload) | ||
} | ||
try { | ||
debug(`Calling ${authService}.create authentication with strategy ${name}`) | ||
@@ -132,0 +132,0 @@ |
Sorry, the diff of this file is not supported yet
77533
Updated@feathersjs/commons@^5.0.10
Updated@feathersjs/errors@^5.0.10
Updated@feathersjs/express@^5.0.10
Updated@feathersjs/feathers@^5.0.10
Updated@feathersjs/koa@^5.0.10
Updated@feathersjs/schema@^5.0.10