25,206 questions
Perhaps I would begin taking a look at the following library:
Enable authentication in your own Angular Application by using Azure Active Directory B2C
https://learn.microsoft.com/en-us/azure/active-directory-b2c/enable-authentication-angular-spa-app
It may not be exactly what you are looking for, but you may be able to use some of the code.
If this is helpful please accept answer.