oniyi-http-plugin-credentials
Advanced tools
Comparing version 0.2.0 to 0.2.1
@@ -85,9 +85,2 @@ 'use strict'; | ||
// load the passport-strategy instance from passport | ||
// eslint-disable-next-line no-underscore-dangle | ||
const strategy = passport._strategy(options.providerName); | ||
if (!strategy) { | ||
throw new Error(`Auth provider with name "${options.providerName}" is not registered`); | ||
} | ||
return { | ||
@@ -142,2 +135,9 @@ name: 'attach-credentials', | ||
// load the passport-strategy instance from passport | ||
// eslint-disable-next-line no-underscore-dangle | ||
const strategy = passport._strategy(options.providerName); | ||
if (!strategy) { | ||
throw new Error(`Auth provider with name "${options.providerName}" is not registered`); | ||
} | ||
return options.refreshCredentials(strategy, credentials, (refreshCredentialsErr, newCredentials) => { | ||
@@ -144,0 +144,0 @@ if (refreshCredentialsErr) { |
{ | ||
"name": "oniyi-http-plugin-credentials", | ||
"version": "0.2.0", | ||
"version": "0.2.1", | ||
"description": "A plugin for oniyi-http-client for automatic attachment of user credentials", | ||
@@ -5,0 +5,0 @@ "homepage": "", |
14638