Hey @MickCG,
Welcome to the Auth0 Community!
I’m glad to hear that the Blazor WASM sample project worked well.
I’m not familiar with Amazon Amplify, but I can try to help you anyway. Can you tell me specifically what the problem is? Are you getting an error? What error message?
Mostly in Amazon I have to put a Login URI and a Logout URI I think that is where my trouble is because I think on the verify its giving a 401 error. I do with the provided URI to test it on the web get to the index page but then the Login seems to go south. I am spending some time looking at their Amazon examples of blazor, seem to me I found one.
After I wrote my last post I went back into the app and realized I don’t think I’m actually getting to the logon screen from Auth0. Seems to me it should be the same info for that as the local version which woks???
Not sure about the problems you are experiencing. I would suggest checking the following:
Make sure that you are using the actual AWS Amplify base URL for the callback and logout URLs in the Auth0 dashboard. I mean, when you run your app locally, you use https://localhost:7290 as the base URL (for example, https://localhost:7290/callback). When you run your app in AWS Amplify, you need to register something like https://xxxxxxxxxxxxxx.amplifyapp.com/callback.
Since your Blazor WASM app is a SPA, make sure that all the URL requests are redirected to the app. As I said, I’m not familiar with AWS Amplify, but I found that you should create a redirect, specifically a redirect for SPA.
Honestly, I’m not sure I can help you. I have little context for the problem and no experience with AWS Amplify.
If everything works well locally, I think this is a specific deployment platform problem. At first glance, it could be a missing redirect to the SPA. In this case, it is not a Blazor problem and even less an Auth0 problem. It’s a general SPA hosting problem that you can solve by configuring redirection properly. But I can only make assumptions
From the error you shared, it seems that your application is not configured properly. Account/Login is the default login path used by ASP.NET Core Identity. Are you using the Auth0 ASP.NET Core Authentication SDK as suggested in the article?
Have you tried the sample project attached to the article and compared its code with your code?
Alternatively, please share your code.
Wait @mela, the article and its sample project are for .NET 7.0.
.NET 8 changes the Blazor hosting model. You can move seamlessly from Server to WASM at the component level. So, the approach used in this article may not work.
Currently, there are no official guidelines on how to deal with external OIDC providers (I’m still exploring this).
See this thread on this topic.
This article is for .NET 6 and 7. With .NET 8 many things have changed in the Blazor application model. Please, refer to the following articles for Blazor in .NET 8: