What is the "DeprecationWarning: auth.moralis is deprecated and will be removed in a future version" about

I get this warning when using the parse server tutorial for authenticating users.

DeprecationWarning: auth.moralis is deprecated and will be removed in a future version. auth.moralis.enabled: true

Hi @DegenDeveloper

Can you show the code which is giving this warning?
And what is your Moralis sdk version?

my package.json file is using moralis: ^2.12.0 and I am pretty sure I have the same code demoed in this repo: https://github.com/MoralisWeb3/Moralis-JS-SDK/blob/main/demos/parse-server/src/auth/authService.ts

this is the exact warning

warn: DeprecationWarning: auth.moralis is deprecated and will be removed in a future version. auth.moralis.enabled: true
(node:64055) [LRU_CACHE_METHOD_del] DeprecationWarning: The del method is deprecated. Please use cache.delete() instead.

and the code that logs it

const user = await serverRequest.post<ParseUser>({
      endpoint: `/users`,
      params: {
        authData: {
          moralis: authData,
        },
      },
      useMasterKey: true,
    });

Hi @DegenDeveloper

The code that you shared, Did you find it from the error stack? or is it something you used in your project code?

I donโ€™t find auth.moralis anywhere in the source file that you shared. So can you please provide more details to reproduce the error on my end?

same thing is happening to me, on the Parse server logs there is this warning:

warn: DeprecationWarning: auth.moralis is deprecated and will be removed in a future version. auth.moralis.enabled: true

The code is the same shared, I think itโ€™s from here in the AuthService.ts

 const result = await Moralis.Auth.requestMessage({
    address,
    chain,
    networkType,
    domain: DOMAIN,
    statement: STATEMENT,
    uri: URI,
    expirationTime: EXPIRATION_TIME,
    timeout: TIMEOUT,
  });

Is this something that will be deprecated/removed?

Thanks

I think auth.moralis is an old function from v1 sdk. Can share the Moralis sdk version which you are using.

And I could not reproduce the error using your code with latest sdk version.

Currently Iโ€™m on the 2.17.0, on Parse server, in the deploy logs the warning appears

Do you have any steps to reproduce this error? I do have an parse server with same code and version but it did not see any warning from it.

Is the error coming from parse server logs or the frontend code? As there will be also be an v1 sdk on frontend code

Nothing particular as steps, Iโ€™ve followed this code demo

The warning appears only on Parse server deploy logs (on Railway).

On frontend we donโ€™t have any trace no more of the Moralis v1. It happened both with a older moralis v2 version on server (2.8.2 and also now with the 2.17.0)

Is this warning breaking any app functions?

I saw some other posts by users who have also reported a similar thing. If it is not breaking anything thing then you can ignore it I think.

From what I see there is no auth.moralis code in the src folder. So it is probably a warning from sdk.