actually there is an opensource library that is created by a developer at square POS
https://github.com/szimek/signature_pad
We used this is an applicant tracking system that we programmed for a client, works great.
But what really is a signature today. We choose not to use them as they truly don't really protect anything and is an unnecessary dated process in the modern world