Skip to content

Commit

Permalink
fix: #8805 define our own name for write API v3
Browse files Browse the repository at this point in the history
  • Loading branch information
julianlam committed Oct 29, 2020
1 parent a08fb8e commit 57ed6be
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/middleware/user.js
Expand Up @@ -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 {
Expand Down
2 changes: 1 addition & 1 deletion src/routes/authentication.js
Expand Up @@ -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 {
Expand Down

0 comments on commit 57ed6be

Please sign in to comment.