mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-10-26 16:46: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) {
|
const passportAuthenticateAsync = function (req, res) {
|
||||||
return new Promise((resolve, reject) => {
|
return new Promise((resolve, reject) => {
|
||||||
passport.authenticate('bearer', { session: false }, (err, user) => {
|
passport.authenticate('core.api', { session: false }, (err, user) => {
|
||||||
if (err) {
|
if (err) {
|
||||||
reject(err);
|
reject(err);
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
@@ -87,7 +87,7 @@ Auth.reloadRoutes = async function (params) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// HTTP bearer authentication
|
// HTTP bearer authentication
|
||||||
passport.use(new BearerStrategy({}, Auth.verifyToken));
|
passport.use('core.api', new BearerStrategy({}, Auth.verifyToken));
|
||||||
|
|
||||||
// Additional logins via SSO plugins
|
// Additional logins via SSO plugins
|
||||||
try {
|
try {
|
||||||
|
|||||||
Reference in New Issue
Block a user