I am trying to build a Single Page App with Azure Functions so that when user wants to visit my website they can visit the url of my azure function which will be a custom domain, like www.contoso.com
But when they visit it first they must automatically go to login page for Azure AD B2C and after they login they get redirected to my SPA with their info.
I know how to create a SPA with azure functions without authentication, and I also know how to configure an azure b2c tenant, I've also added azure ad b2c authentication into Azure Function -> Authentication -> Azure AD -> Advanced.
My question is, how can I initiate the login process for the user, just like in a normal website. In a normal asp website, visual studio provides options to integrate this, but how can I do the same for azure functions?