s-KaiNet / node-sp-auth

Unattended SharePoint http authentication with nodejs
MIT License
137 stars 56 forks source link

"Error: Protocol error (Network.setCookies): Invalid cookie fields" when using ClientId and ClientSecret #86

Closed mhintner closed 4 years ago

mhintner commented 4 years ago

Hi, I'm using your library in combination with https://github.com/koltyakov/sp-auth-puppeteer-sample for generating PDFs based on SharePoint Online News pages. This works fine if I supply username/password. But the requirement is to use ClientId/Secret - which produces the error: "Error: Protocol error (Network.setCookies): Invalid cookie fields". Do you have any info on this? The second question would be if it is possible to provide the SiteURL during runtime (and not stored in private.json)? Thanks, Markus

koltyakov commented 4 years ago

@mhintner,

WIth AddIn-Only, unfortunately, is not possible opening pages, it only allows consuming APIs.

The second question would be if it is possible to provide the SiteURL during runtime (and not stored in private.json)?

Possible, but this line initiation should be ignored or SiteURL passed here based on the arguments values or other logic.

mhintner commented 4 years ago

Very unfortunate limitation of SPO, but thanks anyway.