Skip to content

Commit b3fbe43

Browse files
authored
More reddit auth (#2084)
* Refix reddit passport naming so the DB calls work * Been a while since I've been in this section. Post #2083 * Formatting
1 parent 7922d7f commit b3fbe43

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

controllers/strategies.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
"oauth": true,
2020
"readonly": false
2121
},
22-
"reddit-commonjs": {
22+
"reddit": {
2323
"name": "Reddit",
2424
"oauth": true,
2525
"readonly": true

libs/passportLoader.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,9 @@ exports.strategyInstances = nil();
2323
// Notice it is general so it can load any passport strategy
2424
exports.loadPassport = function (aStrategy) {
2525
var requireStr = 'passport-' + aStrategy.name
26-
+ (aStrategy.name === 'google' ? '-oauth20' : (aStrategy.name === 'gitlab' ? '2' : ''));
26+
+ (aStrategy.name === 'google' ? '-oauth20'
27+
: (aStrategy.name === 'gitlab' ? '2'
28+
: (aStrategy.name === 'reddit' ? '-commonjs' : '')));
2729
var instance = null;
2830
var PassportStrategy = null;
2931

0 commit comments

Comments
 (0)