Skip to content

Commit

Permalink
fixing bug where token auth's failed to load in some cases. Closes #59
Browse files Browse the repository at this point in the history
  • Loading branch information
ekryski authored and daffl committed Aug 25, 2018
1 parent 9660492 commit 52b11a8
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 2 additions & 0 deletions packages/generator-feathers/generators/app/auth-mapping.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@
"name": "google",
"strategy": "passport-google-oauth20",
"tokenStrategy": "passport-google-token",
"tokenStrategyExposedNormally": true,
"permissions": {
"scope": ["profile"]
}
Expand All @@ -51,6 +52,7 @@
"name": "linkedin",
"strategy": "passport-linkedin-oauth2",
"tokenStrategy": "passport-linkedin-token-oauth2",
"tokenStrategyExposedNormally": true,
"permissions": {
"scope": ["r_emailaddress", "r_basicprofile"]
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
const authentication = require('feathers-authentication');
<% for (var i = 0; i < authentication.length; i++) { %>
const <%= S(authentication[i].name).capitalize().s %>Strategy = require('<%= authentication[i].strategy %>').Strategy;<% if (authentication[i].tokenStrategy) { %>
const <%= S(authentication[i].name).capitalize().s %>TokenStrategy = require('<%= authentication[i].tokenStrategy %>');<% }} %>
const <%= S(authentication[i].name).capitalize().s %>TokenStrategy = require('<%= authentication[i].tokenStrategy %>')<% if (authentication[i].tokenStrategyExposedNormally) { %>.Strategy<% } %>;<% }} %>

module.exports = function() {
const app = this;
Expand Down

0 comments on commit 52b11a8

Please sign in to comment.