Jelles
Jelles
CC#
Created by Jelles on 8/8/2024 in #help
Google Auth invalid OAuth state
16 replies
CC#
Created by Jelles on 8/8/2024 in #help
Google Auth invalid OAuth state
I will take a look at that
16 replies
CC#
Created by Jelles on 8/8/2024 in #help
Google Auth invalid OAuth state
16 replies
CC#
Created by Jelles on 8/8/2024 in #help
Google Auth invalid OAuth state
First one
16 replies
CC#
Created by Jelles on 8/8/2024 in #help
Google Auth invalid OAuth state
This is my first time implementing OAuth so I am not experienced at all. I will read the link you send see how far I can get
16 replies
CC#
Created by Jelles on 8/8/2024 in #help
Google Auth invalid OAuth state
No description
16 replies
CC#
Created by Jelles on 8/8/2024 in #help
Google Auth invalid OAuth state
Full error:
Microsoft.AspNetCore.Authentication.AuthenticationFailureException: An error was encountered while handling the remote login.
---> Microsoft.AspNetCore.Authentication.AuthenticationFailureException: The oauth state was missing or invalid.
--- End of inner exception stack trace ---
at Microsoft.AspNetCore.Authentication.RemoteAuthenticationHandler`1.HandleRequestAsync()
at Microsoft.AspNetCore.Authentication.AuthenticationMiddleware.Invoke(HttpContext context)
at Swashbuckle.AspNetCore.SwaggerUI.SwaggerUIMiddleware.Invoke(HttpContext httpContext)
at Swashbuckle.AspNetCore.Swagger.SwaggerMiddleware.Invoke(HttpContext httpContext, ISwaggerProvider swaggerProvider)
at Microsoft.AspNetCore.Diagnostics.DeveloperExceptionPageMiddlewareImpl.Invoke(HttpContext context)
Microsoft.AspNetCore.Authentication.AuthenticationFailureException: An error was encountered while handling the remote login.
---> Microsoft.AspNetCore.Authentication.AuthenticationFailureException: The oauth state was missing or invalid.
--- End of inner exception stack trace ---
at Microsoft.AspNetCore.Authentication.RemoteAuthenticationHandler`1.HandleRequestAsync()
at Microsoft.AspNetCore.Authentication.AuthenticationMiddleware.Invoke(HttpContext context)
at Swashbuckle.AspNetCore.SwaggerUI.SwaggerUIMiddleware.Invoke(HttpContext httpContext)
at Swashbuckle.AspNetCore.Swagger.SwaggerMiddleware.Invoke(HttpContext httpContext, ISwaggerProvider swaggerProvider)
at Microsoft.AspNetCore.Diagnostics.DeveloperExceptionPageMiddlewareImpl.Invoke(HttpContext context)
16 replies
CC#
Created by Jelles on 8/8/2024 in #help
Google Auth invalid OAuth state
I am not too sure what the line: options.DefaultScheme = CookieAuthenticationDefaults.AuthenticationScheme; is and if it's required. Same goes for options.SignInScheme = CookieAuthenticationDefaults.AuthenticationScheme;
16 replies
CC#
Created by Jelles on 8/7/2024 in #help
Blazor Page not updating model
I've encountered an issue with Google Authentication in my application. Initially, I realized I was missing @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:
AuthenticationFailureException: The oauth state was missing or invalid.
AuthenticationFailureException: The oauth state was missing or invalid.
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 Link
Frontend (Startup.cs): Pastebin Link Google Sign-In Button:
<script src="https://accounts.google.com/gsi/client" async></script>

<div id="g_id_onload"
data-client_id="xxxxxxxxxxxxxxxxxxxxxxxxxxxxx.apps.googleusercontent.com"
data-login_uri="http://localhost:5083/signin-google"
data-auto_prompt="false" class="rounded-xl">
</div>
<div class="flex flex-col w-full items-center">
<div class="g_id_signin"
data-type="standard"
data-size="large"
data-theme="outline"
data-text="sign_in_with"
data-shape="rectangular"
data-logo_alignment="left">
</div>
</div>
<script src="https://accounts.google.com/gsi/client" async></script>

<div id="g_id_onload"
data-client_id="xxxxxxxxxxxxxxxxxxxxxxxxxxxxx.apps.googleusercontent.com"
data-login_uri="http://localhost:5083/signin-google"
data-auto_prompt="false" class="rounded-xl">
</div>
<div class="flex flex-col w-full items-center">
<div class="g_id_signin"
data-type="standard"
data-size="large"
data-theme="outline"
data-text="sign_in_with"
data-shape="rectangular"
data-logo_alignment="left">
</div>
</div>
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!
3 replies
CC#
Created by Jelles on 12/5/2022 in #help
❔ WPF Use of multiple item controls
WPF is a bit different compared to what I am used to 😆
24 replies
CC#
Created by Jelles on 12/5/2022 in #help
❔ WPF Use of multiple item controls
Thanks anyway!
24 replies
CC#
Created by Jelles on 12/5/2022 in #help
❔ WPF Use of multiple item controls
24 replies
CC#
Created by Jelles on 12/5/2022 in #help
❔ WPF Use of multiple item controls
Actually pretty close to what I did
24 replies
CC#
Created by Jelles on 12/5/2022 in #help
❔ WPF Use of multiple item controls
🥳
24 replies
CC#
Created by Jelles on 12/5/2022 in #help
❔ WPF Use of multiple item controls
24 replies
CC#
Created by Jelles on 12/5/2022 in #help
❔ WPF Use of multiple item controls
But now I ran into another problem cause I can't bind to the planet now that i bind to an array of items inside the planet object
24 replies
CC#
Created by Jelles on 12/5/2022 in #help
❔ WPF Use of multiple item controls
24 replies
CC#
Created by Jelles on 12/5/2022 in #help
❔ WPF Use of multiple item controls
But there should be lines between some planets
24 replies
CC#
Created by Jelles on 12/5/2022 in #help
❔ WPF Use of multiple item controls
Currently looks like that
24 replies
CC#
Created by Jelles on 12/5/2022 in #help
❔ WPF Use of multiple item controls
24 replies