How to write and configure custom authentication

Hello,

I am trying to implement new authentication service for Node-red .Is it possible to provide any example of how to write and configure custom authentication.

Have you read the documentation?

https://nodered.org/docs/user-guide/runtime/securing-node-red#custom-user-authentication