arkokoley/pdfvuer

Adding HTTP Authorization to createLoadingTask

mikec655 opened this issue · 1 comments

Hey everyone,

I'm trying to view a PDF document with authorization using this package. I can't find a way to add the HTTP authorization to createLoadingTask or another workaround. Does anyone know how to view a document with authorization with pdfvuer?

@mikec655 you should be able to pass parameters to the createLoadingTask like this:

createLoadingTask({
	url: url,
	withCredentials: true,
        httpHeaders: { Authorization: `Bearer ${getAuthenticationToken()}` },
})

specified in #88 (comment) as well