achievements-app/psn-api

Unable to use it in Vue 3

Lyliya opened this issue · 1 comments

Hello, i'm not able to transform my npsso into a code using this library in a VueJS project.
The cookie is not send by default, i had to rebuild the library including credentials: 'include' in the fetch request (exchangeNpssoForCode.ts L30)
But even with that, the script does not get the token from the Location header, even if its set

image

Hi @Lyliya ! Sorry for my ultra late reply 💀

This is caused by PSN throwing a CORS error (and the browser respecting that error). The issue can be bypassed if psn-api is run server-side. I am tracking an issue to detect CORS errors and have better messaging about them here: #109