How to do SSO with Sharepoint online and javascript application

How to do SSO with Sharepoint online and javascript application

If you haven’t done so already you may want to read the following reference documentation: