From 0f7e1fbe319efe7c8d1e38cb8aab513fa5110215 Mon Sep 17 00:00:00 2001 From: Manuel Trezza <5673677+mtrezza@users.noreply.github.com> Date: Tue, 6 Dec 2022 15:36:36 +0100 Subject: [PATCH 1/2] fix log message --- src/Auth.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Auth.js b/src/Auth.js index 918a64ecff..d9a55593c0 100644 --- a/src/Auth.js +++ b/src/Auth.js @@ -435,8 +435,8 @@ const handleAuthDataValidation = async (authData, req, foundUser) => { const authProvider = (req.config.auth || {})[provider] || {}; if (authProvider.enabled == null) { Deprecator.logRuntimeDeprecation({ - usage: `auth.${provider}`, - solution: `auth.${provider}.enabled: true`, + usage: `Using the authentication adapter "${provider}" without explicitly enabling it`, + solution: `Enable the authentication adapter by setting the Parse Server option "auth.${provider}.enabled: true".`, }); } if (!validator || authProvider.enabled === false) { From 8c7d579dc023e4af811fe6852b3b7d1d4da1a43d Mon Sep 17 00:00:00 2001 From: Manuel Trezza <5673677+mtrezza@users.noreply.github.com> Date: Tue, 6 Dec 2022 15:52:05 +0100 Subject: [PATCH 2/2] fix test --- spec/AuthenticationAdapters.spec.js | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/spec/AuthenticationAdapters.spec.js b/spec/AuthenticationAdapters.spec.js index 6fb6ce57d3..a940880cbf 100644 --- a/spec/AuthenticationAdapters.spec.js +++ b/spec/AuthenticationAdapters.spec.js @@ -590,7 +590,7 @@ describe('AuthenticationProviders', function () { ); }); - it('can depreciate', async () => { + it('can deprecate', async () => { await reconfigureServer(); const Deprecator = require('../lib/Deprecator/Deprecator'); const spy = spyOn(Deprecator, 'logRuntimeDeprecation').and.callFake(() => {}); @@ -598,8 +598,9 @@ describe('AuthenticationProviders', function () { Parse.User._registerAuthenticationProvider(provider); await Parse.User._logInWith('myoauth'); expect(spy).toHaveBeenCalledWith({ - usage: 'auth.myoauth', - solution: 'auth.myoauth.enabled: true', + usage: 'Using the authentication adapter "myoauth" without explicitly enabling it', + solution: + 'Enable the authentication adapter by setting the Parse Server option "auth.myoauth.enabled: true".', }); }); });