Not able to use the request token for the WebDAV operations on Nextcloud

My current setup-
Nextcloud Version: 18.0.4.1
Database: mySQL
Php: 7.2.31
System: Ubuntu Subsystem 18.04.1 in windows

I am currently using Node.js to perform WebDAV related operations on nextcloud. All of the operations are working absolutely fine. But, the problem is that I am using username and password to perform these operations and for the users to use this would not be secure at all. I want it to be done through tokens(preferably JWT) to make it safe for the other users, who will be using it.

Is there a way to implement this thing, keeping in mind the security of the users?

Thanks in advance!

use app passwords.

@ChristophWurst Thanks for your immediate response! I hope you could help me figure the following:

The app passwords would be different for different users, right?
How would I have those details from every user and then perform the WebDAV operations?

If I’m wrong, please advice and make me aware of it!

Thanks!

the users have to create it. alternatively you can use oauth but also then users have to grant permissions.

you can’t use webdav without the user’s authentication.

@ChristophWurst Okay! Thanks for the help.