Blazor Page not updating model
Hi, I want to create a login page but I am having issues getting the data to the backend. My backend is working I am using Aspnetcore identity for authentication. The endpoint /login and /register work fine in postman when testing. But when I use my login page I get an error. I have been trying to figure out why this is happening and I feel like the data from my form is not being updated to my model. When debugging this code I see that loginModel is never updated and the values are always null. I left out the authentication code for debugging code. Here is my code:
2 Replies
you don't need to reinvent the auth when you've identity etc already...you can just copy past identity endpoints implementation if you want customization and stuff
I've encountered an issue with Google Authentication in my application. Initially, I realized I was missing
Frontend (Startup.cs): Pastebin Link Google Sign-In Button: Could you help me troubleshoot why the OAuth state might be missing or invalid? Any suggestions on how to resolve this issue would be greatly appreciated!
@rendermode
, which was causing updates to fail. However, I'm now facing a problem with identity authentication. When attempting to integrate Google Auth, I keep receiving the following error upon redirection to my backend:
Despite the error, I can see that the g_csrf_token
is being set in the cookies (e.g., g_csrf_token: bef5dc9647613e43
). I've already configured the endpoints in the Google Console.
Here are the relevant parts of my setup:
Backend (Startup.cs): Pastebin LinkFrontend (Startup.cs): Pastebin Link Google Sign-In Button: Could you help me troubleshoot why the OAuth state might be missing or invalid? Any suggestions on how to resolve this issue would be greatly appreciated!