diff --git a/src/core/plugins/auth/actions.js b/src/core/plugins/auth/actions.js index 57d84550..8e00d392 100644 --- a/src/core/plugins/auth/actions.js +++ b/src/core/plugins/auth/actions.js @@ -120,10 +120,10 @@ export const authorizePassword = ( auth ) => ( { fn, authActions, errActions } ) .catch(err => { errActions.newAuthErr( err ) }) } -export const authorizeOauth2Application = ( auth ) => ( { authActions, errActions } ) => { +export const authorizeOauth2Application = ( auth ) => ( { fn, authActions, errActions } ) => { let { schema, scopes, name, clientId, clientSecret } = auth - fetch(schema.get("tokenUrl"), { + fn.fetch(schema.get("tokenUrl"), { method: "post", headers: { "Accept":"application/json, text/plain, */*", "Content-Type": "application/x-www-form-urlencoded"