Custom login in angular 5 to authenticate with AzureAD

I have created a nodejs Web API for my backend, and my client application is written in Angular 5, as part of the requirements they want me to create a login page inside this app asking for email and password, I've been looking for an example where they try to do the same thing I am doing but I've been unlucky. I tried angular-oauth2-oidc library for doing this but I received a CORS error. Could someone provide a guide for doing this?

I've seen that moodle web app did this but is in PHP how I could implement this?