Skip to content

Commit 4c87640

Browse files
committed
Fix GitHub OAuth callback navigation paths
- Use relative path 'login' instead of absolute '/login' for error redirect - Use empty string for success redirect (respects base href /app/)
1 parent ffd4c1b commit 4c87640

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

cloud/src/LrmCloud.Web/Pages/Auth/GitHubCallback.razor

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
<RadzenAlert AlertStyle="AlertStyle.Danger" Shade="Shade.Lighter" AllowClose="false">
1616
@_errorMessage
1717
</RadzenAlert>
18-
<RadzenButton Text="Back to Login" Click="@(() => Navigation.NavigateTo("/login"))" />
18+
<RadzenButton Text="Back to Login" Click="@(() => Navigation.NavigateTo("login"))" />
1919
}
2020
else
2121
{
@@ -82,7 +82,9 @@
8282
{
8383
// Clear the fragment from URL before redirecting (security)
8484
await JS.InvokeVoidAsync("clearUrlFragment");
85-
Navigation.NavigateTo("/", forceLoad: true);
85+
// Navigate to home - use forceLoad to ensure auth state is refreshed
86+
// Empty string navigates to app root (base href), not site root
87+
Navigation.NavigateTo("", forceLoad: true);
8688
}
8789
else
8890
{

0 commit comments

Comments
 (0)