Как подключиться к OAuth 2.0 с помощью FeathersJS? Я всегда получаю 404 страницы.

Я хочу добавить проверку подлинности OAuth в свое приложение FeathersJS, но всегда получаю страницу 404, не найденную при доступе http://localhost:3030/auth/canvas, Вот мой код:

const authentication = require('feathers-authentication');
const jwt = require('feathers-authentication-jwt');
const oauth2 = require('feathers-authentication-oauth2');
const CanvasStrategy = require('passport-canvas').Strategy;`

const config = app.get('authentication');
app.configure(authentication(config));
app.configure(jwt());

app.configure(oauth2({
  name: 'canvas',
  Strategy: CanvasStrategy,
  clientID: '<myID>',
  clientSecret: '<mysecret>',
  authorizationURL: 'https://example.com/login/oauth2/auth',
  tokenURL: 'https://example.com/login/oauth2/token',
  callbackURL: 'www.example.com',
  state: true
}));

0 ответов

Другие вопросы по тегам