add fn.fetch instead of native fetch

This commit is contained in:
Mészáros Mihály
2017-04-06 14:46:04 +02:00
parent 4066d1920e
commit 81abe37a31

View File

@@ -120,10 +120,10 @@ export const authorizePassword = ( auth ) => ( { fn, authActions, errActions } )
.catch(err => { errActions.newAuthErr( err ) }) .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 let { schema, scopes, name, clientId, clientSecret } = auth
fetch(schema.get("tokenUrl"), { fn.fetch(schema.get("tokenUrl"), {
method: "post", headers: { method: "post", headers: {
"Accept":"application/json, text/plain, */*", "Accept":"application/json, text/plain, */*",
"Content-Type": "application/x-www-form-urlencoded" "Content-Type": "application/x-www-form-urlencoded"