Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wiki-js
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
1
Issues
1
List
Board
Labels
Milestones
Merge Requests
1
Merge Requests
1
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Jacklull
wiki-js
Commits
a652e43a
Unverified
Commit
a652e43a
authored
Mar 25, 2022
by
Nicolas Giard
Committed by
GitHub
Mar 25, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: handle multi social auth strategies
parent
1f489a3d
Hide whitespace changes
Inline
Side-by-side
Showing
19 changed files
with
19 additions
and
19 deletions
+19
-19
authentication.js
server/modules/authentication/auth0/authentication.js
+1
-1
authentication.js
server/modules/authentication/azure/authentication.js
+1
-1
authentication.js
server/modules/authentication/cas/authentication.js
+1
-1
authentication.js
server/modules/authentication/discord/authentication.js
+1
-1
authentication.js
server/modules/authentication/dropbox/authentication.js
+1
-1
authentication.js
server/modules/authentication/facebook/authentication.js
+1
-1
authentication.js
server/modules/authentication/firebase/authentication.js
+1
-1
authentication.js
server/modules/authentication/github/authentication.js
+1
-1
authentication.js
server/modules/authentication/gitlab/authentication.js
+1
-1
authentication.js
server/modules/authentication/google/authentication.js
+1
-1
authentication.js
server/modules/authentication/keycloak/authentication.js
+1
-1
authentication.js
server/modules/authentication/microsoft/authentication.js
+1
-1
authentication.js
server/modules/authentication/oauth2/authentication.js
+1
-1
authentication.js
server/modules/authentication/oidc/authentication.js
+1
-1
authentication.js
server/modules/authentication/okta/authentication.js
+1
-1
authentication.js
server/modules/authentication/rocketchat/authentication.js
+1
-1
authentication.js
server/modules/authentication/saml/authentication.js
+1
-1
authentication.js
server/modules/authentication/slack/authentication.js
+1
-1
authentication.js
server/modules/authentication/twitch/authentication.js
+1
-1
No files found.
server/modules/authentication/auth0/authentication.js
View file @
a652e43a
...
@@ -8,7 +8,7 @@ const Auth0Strategy = require('passport-auth0').Strategy
...
@@ -8,7 +8,7 @@ const Auth0Strategy = require('passport-auth0').Strategy
module
.
exports
=
{
module
.
exports
=
{
init
(
passport
,
conf
)
{
init
(
passport
,
conf
)
{
passport
.
use
(
'auth0'
,
passport
.
use
(
conf
.
key
,
new
Auth0Strategy
({
new
Auth0Strategy
({
domain
:
conf
.
domain
,
domain
:
conf
.
domain
,
clientID
:
conf
.
clientId
,
clientID
:
conf
.
clientId
,
...
...
server/modules/authentication/azure/authentication.js
View file @
a652e43a
...
@@ -23,7 +23,7 @@ module.exports = {
...
@@ -23,7 +23,7 @@ module.exports = {
keyString
=
keyString
.
substring
(
44
);
keyString
=
keyString
.
substring
(
44
);
}
}
}
}
passport
.
use
(
'azure'
,
passport
.
use
(
conf
.
key
,
new
OIDCStrategy
({
new
OIDCStrategy
({
identityMetadata
:
conf
.
entryPoint
,
identityMetadata
:
conf
.
entryPoint
,
clientID
:
conf
.
clientId
,
clientID
:
conf
.
clientId
,
...
...
server/modules/authentication/cas/authentication.js
View file @
a652e43a
...
@@ -8,7 +8,7 @@ const CASStrategy = require('passport-cas').Strategy
...
@@ -8,7 +8,7 @@ const CASStrategy = require('passport-cas').Strategy
module
.
exports
=
{
module
.
exports
=
{
init
(
passport
,
conf
)
{
init
(
passport
,
conf
)
{
passport
.
use
(
'cas'
,
passport
.
use
(
conf
.
key
,
new
CASStrategy
({
new
CASStrategy
({
ssoBaseURL
:
conf
.
ssoBaseURL
,
ssoBaseURL
:
conf
.
ssoBaseURL
,
serverBaseURL
:
conf
.
serverBaseURL
,
serverBaseURL
:
conf
.
serverBaseURL
,
...
...
server/modules/authentication/discord/authentication.js
View file @
a652e43a
...
@@ -9,7 +9,7 @@ const _ = require('lodash')
...
@@ -9,7 +9,7 @@ const _ = require('lodash')
module
.
exports
=
{
module
.
exports
=
{
init
(
passport
,
conf
)
{
init
(
passport
,
conf
)
{
passport
.
use
(
'discord'
,
passport
.
use
(
conf
.
key
,
new
DiscordStrategy
({
new
DiscordStrategy
({
clientID
:
conf
.
clientId
,
clientID
:
conf
.
clientId
,
clientSecret
:
conf
.
clientSecret
,
clientSecret
:
conf
.
clientSecret
,
...
...
server/modules/authentication/dropbox/authentication.js
View file @
a652e43a
...
@@ -9,7 +9,7 @@ const _ = require('lodash')
...
@@ -9,7 +9,7 @@ const _ = require('lodash')
module
.
exports
=
{
module
.
exports
=
{
init
(
passport
,
conf
)
{
init
(
passport
,
conf
)
{
passport
.
use
(
'dropbox'
,
passport
.
use
(
conf
.
key
,
new
DropboxStrategy
({
new
DropboxStrategy
({
apiVersion
:
'2'
,
apiVersion
:
'2'
,
clientID
:
conf
.
clientId
,
clientID
:
conf
.
clientId
,
...
...
server/modules/authentication/facebook/authentication.js
View file @
a652e43a
...
@@ -9,7 +9,7 @@ const _ = require('lodash')
...
@@ -9,7 +9,7 @@ const _ = require('lodash')
module
.
exports
=
{
module
.
exports
=
{
init
(
passport
,
conf
)
{
init
(
passport
,
conf
)
{
passport
.
use
(
'facebook'
,
passport
.
use
(
conf
.
key
,
new
FacebookStrategy
({
new
FacebookStrategy
({
clientID
:
conf
.
clientId
,
clientID
:
conf
.
clientId
,
clientSecret
:
conf
.
clientSecret
,
clientSecret
:
conf
.
clientSecret
,
...
...
server/modules/authentication/firebase/authentication.js
View file @
a652e43a
...
@@ -11,7 +11,7 @@ const _ = require('lodash')
...
@@ -11,7 +11,7 @@ const _ = require('lodash')
module
.
exports
=
{
module
.
exports
=
{
init
(
passport
,
conf
)
{
init
(
passport
,
conf
)
{
passport
.
use
(
'firebase'
,
passport
.
use
(
conf
.
key
,
new
FirebaseStrategy
({
new
FirebaseStrategy
({
clientID
:
conf
.
clientId
,
clientID
:
conf
.
clientId
,
clientSecret
:
conf
.
clientSecret
,
clientSecret
:
conf
.
clientSecret
,
...
...
server/modules/authentication/github/authentication.js
View file @
a652e43a
...
@@ -24,7 +24,7 @@ module.exports = {
...
@@ -24,7 +24,7 @@ module.exports = {
githubConfig
.
userEmailURL
=
`
${
conf
.
enterpriseUserEndpoint
}
/emails`
githubConfig
.
userEmailURL
=
`
${
conf
.
enterpriseUserEndpoint
}
/emails`
}
}
passport
.
use
(
'github'
,
passport
.
use
(
conf
.
key
,
new
GitHubStrategy
(
githubConfig
,
async
(
req
,
accessToken
,
refreshToken
,
profile
,
cb
)
=>
{
new
GitHubStrategy
(
githubConfig
,
async
(
req
,
accessToken
,
refreshToken
,
profile
,
cb
)
=>
{
try
{
try
{
const
user
=
await
WIKI
.
models
.
users
.
processProfile
({
const
user
=
await
WIKI
.
models
.
users
.
processProfile
({
...
...
server/modules/authentication/gitlab/authentication.js
View file @
a652e43a
...
@@ -9,7 +9,7 @@ const _ = require('lodash')
...
@@ -9,7 +9,7 @@ const _ = require('lodash')
module
.
exports
=
{
module
.
exports
=
{
init
(
passport
,
conf
)
{
init
(
passport
,
conf
)
{
passport
.
use
(
'gitlab'
,
passport
.
use
(
conf
.
key
,
new
GitLabStrategy
({
new
GitLabStrategy
({
clientID
:
conf
.
clientId
,
clientID
:
conf
.
clientId
,
clientSecret
:
conf
.
clientSecret
,
clientSecret
:
conf
.
clientSecret
,
...
...
server/modules/authentication/google/authentication.js
View file @
a652e43a
...
@@ -40,7 +40,7 @@ module.exports = {
...
@@ -40,7 +40,7 @@ module.exports = {
}
}
}
}
passport
.
use
(
'google'
,
strategy
)
passport
.
use
(
conf
.
key
,
strategy
)
},
},
logout
(
conf
)
{
logout
(
conf
)
{
return
'/'
return
'/'
...
...
server/modules/authentication/keycloak/authentication.js
View file @
a652e43a
...
@@ -10,7 +10,7 @@ const KeycloakStrategy = require('@exlinc/keycloak-passport')
...
@@ -10,7 +10,7 @@ const KeycloakStrategy = require('@exlinc/keycloak-passport')
module
.
exports
=
{
module
.
exports
=
{
init
(
passport
,
conf
)
{
init
(
passport
,
conf
)
{
passport
.
use
(
'keycloak'
,
passport
.
use
(
conf
.
key
,
new
KeycloakStrategy
({
new
KeycloakStrategy
({
authorizationURL
:
conf
.
authorizationURL
,
authorizationURL
:
conf
.
authorizationURL
,
userInfoURL
:
conf
.
userInfoURL
,
userInfoURL
:
conf
.
userInfoURL
,
...
...
server/modules/authentication/microsoft/authentication.js
View file @
a652e43a
...
@@ -9,7 +9,7 @@ const _ = require('lodash')
...
@@ -9,7 +9,7 @@ const _ = require('lodash')
module
.
exports
=
{
module
.
exports
=
{
init
(
passport
,
conf
)
{
init
(
passport
,
conf
)
{
passport
.
use
(
'microsoft'
,
passport
.
use
(
conf
.
key
,
new
WindowsLiveStrategy
({
new
WindowsLiveStrategy
({
clientID
:
conf
.
clientId
,
clientID
:
conf
.
clientId
,
clientSecret
:
conf
.
clientSecret
,
clientSecret
:
conf
.
clientSecret
,
...
...
server/modules/authentication/oauth2/authentication.js
View file @
a652e43a
...
@@ -49,7 +49,7 @@ module.exports = {
...
@@ -49,7 +49,7 @@ module.exports = {
done
(
null
,
data
)
done
(
null
,
data
)
})
})
}
}
passport
.
use
(
'oauth2'
,
client
)
passport
.
use
(
conf
.
key
,
client
)
},
},
logout
(
conf
)
{
logout
(
conf
)
{
if
(
!
conf
.
logoutURL
)
{
if
(
!
conf
.
logoutURL
)
{
...
...
server/modules/authentication/oidc/authentication.js
View file @
a652e43a
...
@@ -10,7 +10,7 @@ const OpenIDConnectStrategy = require('passport-openidconnect').Strategy
...
@@ -10,7 +10,7 @@ const OpenIDConnectStrategy = require('passport-openidconnect').Strategy
module
.
exports
=
{
module
.
exports
=
{
init
(
passport
,
conf
)
{
init
(
passport
,
conf
)
{
passport
.
use
(
'oidc'
,
passport
.
use
(
conf
.
key
,
new
OpenIDConnectStrategy
({
new
OpenIDConnectStrategy
({
authorizationURL
:
conf
.
authorizationURL
,
authorizationURL
:
conf
.
authorizationURL
,
tokenURL
:
conf
.
tokenURL
,
tokenURL
:
conf
.
tokenURL
,
...
...
server/modules/authentication/okta/authentication.js
View file @
a652e43a
...
@@ -9,7 +9,7 @@ const _ = require('lodash')
...
@@ -9,7 +9,7 @@ const _ = require('lodash')
module
.
exports
=
{
module
.
exports
=
{
init
(
passport
,
conf
)
{
init
(
passport
,
conf
)
{
passport
.
use
(
'okta'
,
passport
.
use
(
conf
.
key
,
new
OktaStrategy
({
new
OktaStrategy
({
audience
:
conf
.
audience
,
audience
:
conf
.
audience
,
clientID
:
conf
.
clientId
,
clientID
:
conf
.
clientId
,
...
...
server/modules/authentication/rocketchat/authentication.js
View file @
a652e43a
...
@@ -33,7 +33,7 @@ module.exports = {
...
@@ -33,7 +33,7 @@ module.exports = {
})
})
}
}
passport
.
use
(
'rocketchat'
,
passport
.
use
(
conf
.
key
,
new
OAuth2Strategy
({
new
OAuth2Strategy
({
authorizationURL
:
`
${
siteURL
}
/oauth/authorize`
,
authorizationURL
:
`
${
siteURL
}
/oauth/authorize`
,
tokenURL
:
`
${
siteURL
}
/oauth/token`
,
tokenURL
:
`
${
siteURL
}
/oauth/token`
,
...
...
server/modules/authentication/saml/authentication.js
View file @
a652e43a
...
@@ -37,7 +37,7 @@ module.exports = {
...
@@ -37,7 +37,7 @@ module.exports = {
if
(
!
_
.
isEmpty
(
conf
.
decryptionPvk
))
{
if
(
!
_
.
isEmpty
(
conf
.
decryptionPvk
))
{
samlConfig
.
decryptionPvk
=
conf
.
decryptionPvk
samlConfig
.
decryptionPvk
=
conf
.
decryptionPvk
}
}
passport
.
use
(
'saml'
,
passport
.
use
(
conf
.
key
,
new
SAMLStrategy
(
samlConfig
,
async
(
req
,
profile
,
cb
)
=>
{
new
SAMLStrategy
(
samlConfig
,
async
(
req
,
profile
,
cb
)
=>
{
try
{
try
{
const
userId
=
_
.
get
(
profile
,
[
conf
.
mappingUID
],
null
)
||
_
.
get
(
profile
,
'nameID'
,
null
)
const
userId
=
_
.
get
(
profile
,
[
conf
.
mappingUID
],
null
)
||
_
.
get
(
profile
,
'nameID'
,
null
)
...
...
server/modules/authentication/slack/authentication.js
View file @
a652e43a
...
@@ -9,7 +9,7 @@ const _ = require('lodash')
...
@@ -9,7 +9,7 @@ const _ = require('lodash')
module
.
exports
=
{
module
.
exports
=
{
init
(
passport
,
conf
)
{
init
(
passport
,
conf
)
{
passport
.
use
(
'slack'
,
passport
.
use
(
conf
.
key
,
new
SlackStrategy
({
new
SlackStrategy
({
clientID
:
conf
.
clientId
,
clientID
:
conf
.
clientId
,
clientSecret
:
conf
.
clientSecret
,
clientSecret
:
conf
.
clientSecret
,
...
...
server/modules/authentication/twitch/authentication.js
View file @
a652e43a
...
@@ -9,7 +9,7 @@ const _ = require('lodash')
...
@@ -9,7 +9,7 @@ const _ = require('lodash')
module
.
exports
=
{
module
.
exports
=
{
init
(
passport
,
conf
)
{
init
(
passport
,
conf
)
{
passport
.
use
(
'twitch'
,
passport
.
use
(
conf
.
key
,
new
TwitchStrategy
({
new
TwitchStrategy
({
clientID
:
conf
.
clientId
,
clientID
:
conf
.
clientId
,
clientSecret
:
conf
.
clientSecret
,
clientSecret
:
conf
.
clientSecret
,
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment