mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-10-26 08:36:12 +01:00
fix: #8805 define our own name for write API v3
This commit is contained in:
@@ -19,7 +19,7 @@ const controllers = {
|
||||
|
||||
const passportAuthenticateAsync = function (req, res) {
|
||||
return new Promise((resolve, reject) => {
|
||||
passport.authenticate('bearer', { session: false }, (err, user) => {
|
||||
passport.authenticate('core.api', { session: false }, (err, user) => {
|
||||
if (err) {
|
||||
reject(err);
|
||||
} else {
|
||||
|
||||
@@ -87,7 +87,7 @@ Auth.reloadRoutes = async function (params) {
|
||||
}
|
||||
|
||||
// HTTP bearer authentication
|
||||
passport.use(new BearerStrategy({}, Auth.verifyToken));
|
||||
passport.use('core.api', new BearerStrategy({}, Auth.verifyToken));
|
||||
|
||||
// Additional logins via SSO plugins
|
||||
try {
|
||||
|
||||
Reference in New Issue
Block a user