I am using custom authentication.
I am using ‘parse-server-firebase-auth’ module.
My config:
{
…
auth: {
firebase: new FirebaseAuthAdapter()
}
}
Full error:
error: Uncaught internal server error. Cannot destructure property ‘adapter’ of ‘loadAuthAdapter(…)’ as it is undefined. {“stack”:“TypeError: Cannot destructure property ‘adapter’ of ‘loadAuthAdapter(…)’ as it is undefined.\n at Object.getValidatorForProvider (/usr/src/app/node_modules/parse-server/lib/Adapters/Auth/index.js:159:7)\n at /usr/src/app/node_modules/parse-server/lib/RestWrite.js:357:58\n at Array.map ()\n at RestWrite.handleAuthDataValidation (/usr/src/app/node_modules/parse-server/lib/RestWrite.js:352:45)\n at /usr/src/app/node_modules/parse-server/lib/RestWrite.js:498:17\n at processTicksAndRejections (internal/process/task_queues.js:93:5)”}
Not sure what exactly the error is.
Update: I tried with dummy auth adapter, I still get the same error.
{
…
If you read their documentation, they provide examples of how to set up Parse Sever to use this adapter. Without more info it’s difficult to tell what the issue is. If you follow their instructions and still cannot get it to work, maybe you want to open an issue on their GitHub page? Because without looking into the adapter itself, it’s difficult to say.
Thanks for the reply, non of the custom authetication is working. I tried dummy auth adapter too.
The following config slso givingin me the same error exactly.
{
…
Error log:
2021-04-07 14:02:03.029 PDT error: Uncaught internal server error. Cannot destructure property ‘adapter’ of ‘loadAuthAdapter(…)’ as it is undefined. {“stack”:“TypeError: Cannot destructure property ‘adapter’ of ‘loadAuthAdapter(…)’ as it is undefined.\n at Object.getValidatorForProvider (/usr/src/app/node_modules/parse-server/lib/Adapters/Auth/index.js:159:7)\n at /usr/src/app/node_modules/parse-server/lib/RestWrite.js:357:58\n at Array.map ()\n at RestWrite.handleAuthDataValidation (/usr/src/app/node_modules/parse-server/lib/RestWrite.js:352:45)\n at /usr/src/app/node_modules/parse-server/lib/RestWrite.js:498:17\n at processTicksAndRejections (internal/process/task_queues.js:93:5)”}
2021-04-07 14:02:03.035 PDT TypeError: Cannot destructure property ‘adapter’ of ‘loadAuthAdapter(…)’ as it is undefined. at Object.getValidatorForProvider (/usr/src/app/node_modules/parse-server/lib/Adapters/Auth/index.js:159:7)
2021-04-07 14:02:03.035 PDT at /usr/src/app/node_modules/parse-server/lib/RestWrite.js:357:58
2021-04-07 14:02:03.035 PDT at Array.map ()
2021-04-07 14:02:03.035 PDT at RestWrite.handleAuthDataValidation (/usr/src/app/node_modules/parse-server/lib/RestWrite.js:352:45)
2021-04-07 14:02:03.035 PDT at /usr/src/app/node_modules/parse-server/lib/RestWrite.js:498:17
2021-04-07 14:02:03.035 PDT at processTicksAndRejections (internal/process/task_queues.js:93:5)
I haven’t looked into the adapter but the release is from 3 years ago. If you have installed the adapter using npm, it is possible that the adapter interface has changed since then.
What you could do is debug Parse Server and set a exception breakpoint. That should tell you what the issue is.
To mitigate the possibility of issues custom to your setup, I suggest you use the Parse Server Example repo, make Parse Server work without the auth adapter and then add the adapter.