So, I have a static web app hosted on Azure (learning purposes), and the same app hosted on Vercel. Both of them point to the same Supabase project.
I have had in the past issues with Vercel caching prisma artifacts and Azure actually displaying the content from the PostGres DB. Now, I have deployed (changing my scripts to generate) and the issue appears to have switched, although now when I try to login on my Azure app, I get:
AuthRetryableFetchError: URL is not valid or contains user credentials.
This has all started after I updated a yml file (which fixed an Azure deployment issue), but then I had an apparent issue with the supabase variables I was useing on Azure. The Vercel app was loading content from supabase, but Azure doesn't. So, I deleted the variables on Azure, and re-entered them and now I have reached the error above.
I believe the error to be in Azure, although I am not 100% sure yet, but I'm struggling now ...
What I've tried:
The error message
AuthRetryableFetchError: URL is not valid or contains user credentials
shows that there is an issue with the URL or the user credentials.
Check the Supabase credentials and CORS Settings.
Verify the environment variables in Azure portal and check whether they are mapped correctly and match with the Supabase credentials.
Check the Azure deployment logs for any errors or warnings related to Supabase connectivity.
Check the Azure AD authentication and authorization logs.
Use the below query (query reference from MSDoc) to check the application Gateway logs.
AzureDiagnostics
| where ResourceType == "APPLICATIONGATEWAYS" and OperationName == "ApplicationGatewayAccess" and httpStatus_d > 399
| summarize AggregatedValue = count() by bin(TimeGenerated, 1h), _ResourceId
| render timechart
For more information, check this blog.