From 4fb4fcfe30afc2ad968c234bbb3507ac21c31416 Mon Sep 17 00:00:00 2001 From: gustojs Date: Wed, 9 Aug 2023 14:48:36 +0200 Subject: [PATCH 1/2] Fix wrong config key from "scope" to scopes" Both Discord and `@feathers/authentication-oauth` expect "scope" and not "scopes". --- docs/cookbook/authentication/_discord.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/cookbook/authentication/_discord.md b/docs/cookbook/authentication/_discord.md index e45558de97..e333912b75 100644 --- a/docs/cookbook/authentication/_discord.md +++ b/docs/cookbook/authentication/_discord.md @@ -13,7 +13,7 @@ Discord login can be initialized like any other [OAuth provider](../../api/authe "discord": { "key": "", "secret": "", - "scopes": ["identify email"] + "scope": ["identify email"] } } } From 0d9a1e2fc65b6f6d2b0f34f433bec294c23ef00f Mon Sep 17 00:00:00 2001 From: gustojs Date: Thu, 10 Aug 2023 04:55:33 +0200 Subject: [PATCH 2/2] Update expressOauth to oauth `@feathersjs/authentication-oauth` doesn't export `expressOauth`, it only exports `oauth`. --- docs/cookbook/authentication/_discord.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/cookbook/authentication/_discord.md b/docs/cookbook/authentication/_discord.md index e333912b75..f861de5e7d 100644 --- a/docs/cookbook/authentication/_discord.md +++ b/docs/cookbook/authentication/_discord.md @@ -36,7 +36,7 @@ import axios, {AxiosRequestConfig} from 'axios' import {ServiceAddons} from '@feathersjs/feathers'; import {AuthenticationService, JWTStrategy} from '@feathersjs/authentication'; import {LocalStrategy} from '@feathersjs/authentication-local'; -import {expressOauth} from '@feathersjs/authentication-oauth'; +import {oauth} from '@feathersjs/authentication-oauth'; import {Application} from './declarations'; @@ -48,7 +48,7 @@ export default function (app: Application) { authentication.register('discord', new DiscordStrategy()); app.use('/authentication', authentication); - app.configure(expressOauth()); + app.configure(oauth()); } export class DiscordStrategy extends OAuthStrategy {