DEV Community

Discussion on: Going from 0 to 11 with REST APIs on Azure Functions

Collapse
 
liamgsmith profile image
Liam Smith

Hey Skyler, This is great! I have been wondering for a while which way to build API's as a noob, and this gives me a bit more context on how to go spec first - thank you.

One thing I've been having issues with Azure Functions is how to authenticate users to them via Azure B2C as part of an app (I'm using React). Are there any resources you recommend?

The walkthroughs/tutorials offered by Microsoft really don't cut it as they are really really fragmented and are very 'here's a bunch of steps' rather than 'here's the gist of what you need to do, why you need to do it, and then how we do it'.

The rapidly evolving nature of Azure Functions seems to be against it as documentation is going out of date very quickly.

Collapse
 
skylerhartle profile image
Skyler Hartle

Hey Liam!

No kidding re: the evolving nature of Functions. It's hard to keep up with the constant changes, but we're trying to do our best. Have you looked into using the consumption tier for Azure API Management to do this? It's the path we recommend for API related workloads:

Secure an Azure API Management API with Azure AD B2C

APIM supports AAD B2C out of the box. You essentially will throw a proxy in front of your Function via APIM, and then leverage the capabilities APIM provides. You can link/create a new APIM instance via the Azure Functions portal blade (it's under "API Management"), which would be the fastest way to spin up a new API that's linked to your function app.

I understand it may seem counterintuitive to spin up a new service for a single feature, but IMO, using API Management for throttling, authentication/authorization, etc, is a nice way to abstract those details and establish a good foundation for the future.

Would love to hear your thoughts re: if this is overkill for you or not.