Forum How do I...?

Authentication path

Hi there,
I didn't find the answer yet. So maybe someone can help.
How can I specify a custom path for the authentication ?
I am looking for something like this :

$prince http://myapp/html/test.pdf -o ~/test.pdf \
--auth-user="" \
--auth-password="mypwd" \
--auth-scheme="http" \
--auth-server="" \

Thanks in advance.

Do you want to only send the credentials when making a HTTP request when the URL contains a particular path? Prince doesn't support that yet.
Thanks for your reply.
I am currently looking for a solution to build a dedicated and private App to generate PDF.
I think, I will develop it with Nuxt Js (Frontend) combined to Strapi(backend).
As everything must be private, Prince needs to be authenticated into Strapi from my frontend app...

I am open to all suggestions to do it.

If you don't mind sending the credentials with all requests to "" (whether it be to "/api/auth" or not) then you can use the HTTP Basic authentication support in Prince.

Otherwise, you could use cookie-based authentication. For example, you could make a login request (outside Prince) to obtain an access token, then tell Prince to send that token as a cookie for any HTTP requests to your backend.
I tried again with the cookie-based authentication, and finally I managed to make it works. My mistake.

I was setting up the cookie like so :
const princeOptions = {
    'cookie': 'jwt=eyJhbGciOiJIUz[...]; domain=localhost;'


instead of :
const princeOptions = {
    'cookies': 'jwt=eyJhbGciOiJIUz[...]; domain=localhost;'

Thanks again for your help.