Sorry the original message got deleted, but I want to create a standalone auth server in node js and use nexjs to create my application, @bekacru suggested me to use authClient, and so I did, But I am facing an another issue specified in the above message