Use particle-api-js instead
sparkjs is deprecated. particle-api-js is the replacement library. The login form components have not been ported, but you can copy the code.
The old sparkjs documentation is still available.
npm i spark
2 years ago
Test with RunKit