0
votes

I'm very new to Azure development and I only know a little JavaScript, no C#. I'm trying develop an iPhone App using React Native and Expo.

I have 2 Azure tenancies:

APP 1 - private API: AzureFunctions App registration in Private Tenancy

APP 2 - public client: Azure Web App registration in Azure B2C Tenancy (this is the logical app that represents the iPhone app)

MSAL doesn't support AAD B2C Third Party Identity Providers (Google, Facebook, etc.) on Javascript Apps running on iPhone, however I seem to have successfully gotten the token back into the Expo iPhone app.

When I pass my Access Token that was generated by Azure AD B2C to my anonymous HTTP Trigger AzureFunctions App (that has Service Authentication turned on) I am denied access.

I have tried following this guide: https://docs.microsoft.com/en-us/azure/app-service/configure-authentication-provider-aad but I cannot verify the domain of the AzureFunctions app, even though I have tried to use proxies to route the AAD B2C validator to the .json file.

Cannot verify publisher domain Proxy configuration in Azure Functions Kudu

Possible errors:

  1. I haven't configured AZFunctions proxies correctly, when I go to the URL I am submitting to AAD B2C "Publisher Domain Verifier" I am not served the .JSON file.

  2. CORS: I am trying to access the API from exp:// instead of an http:// server location

Any advice would be appreciated!

1
I couldn't figure out how to get it to serve files, but I did a response override which workedabove-the-line

1 Answers

0
votes

I couldn't figure out how to get it to point to the JSON file or indeed serve that file, but the response override did the trick!

Response override

However I still am unable to specify the other tenancy (xxxxxxxx-azurewebsites.net)

Expose an API in a different tenancy

In the end I abandoned this "automated authentication" and wrote my own token validator.