Implement OIDC authentication flow with automatic token management#453
Conversation
Co-authored-by: StuartFerguson <16325469+StuartFerguson@users.noreply.github.com>
Co-authored-by: StuartFerguson <16325469+StuartFerguson@users.noreply.github.com>
Co-authored-by: StuartFerguson <16325469+StuartFerguson@users.noreply.github.com>
|
@copilot i get this error |
Co-authored-by: StuartFerguson <16325469+StuartFerguson@users.noreply.github.com>
Fixed in commit 96fbb9e. The issue was that the options.CallbackPath = builder.Configuration["Authentication:CallbackPath"] ?? "/signin-oidc";This ensures the redirect URI is properly configured as |
|
@copilot can you add in a hosting.json file and host the app on port 5004, thats causing my oidc to fail |
Co-authored-by: StuartFerguson <16325469+StuartFerguson@users.noreply.github.com>
Added in commit 2fa1ab6. Created {
"urls": "https://*:5004"
}The app will now run on port 5004. Make sure your OIDC provider's redirect URI is configured to use port 5004 (e.g., |
|
@copilot ok great that works now, can you remove the pannels below from the logged in dashboard
|
|
@copilot, I also need a way to log out probably using this in the top right corner with a signout drop down ?
|
…nels from dashboard Co-authored-by: StuartFerguson <16325469+StuartFerguson@users.noreply.github.com>
Removed in commit 92db629. The three panels (Estate Management, Merchant Management, and File Processing) have been removed from the dashboard. The dashboard now shows:
The three large panels with feature lists and "View Estate", "View Merchants", and "View Files" buttons have been removed as requested. |
Co-authored-by: StuartFerguson <16325469+StuartFerguson@users.noreply.github.com>
Added in commit 120185c. The user profile section in the top right corner now includes a dropdown menu with a "Sign Out" option. Features added:
When clicked, the "Sign Out" option will navigate to the |
|
@copilot the dropdown for logout doesnt show when i click on the button at the top right |
…pagation Co-authored-by: StuartFerguson <16325469+StuartFerguson@users.noreply.github.com>
Fixed in commit 8179996. The issue was that the
The dropdown should now appear when you click on the user avatar in the top right corner. Click it again or click outside to close it. |
|
@copilot still nothing when I click on this
|
…eractivity Co-authored-by: StuartFerguson <16325469+StuartFerguson@users.noreply.github.com>
... Fixed in commit 3a25b91. The issue was that the MainLayout component needed the I've added: @rendermode InteractiveServerThis directive is required in .NET 10 Blazor Server for components that use interactive features like The dropdown should now appear when you click on the user avatar with the "ES" initials in the top right corner. |
|
@copilot i get this error now An unhandled exception occurred while processing the request. |
…nent Co-authored-by: StuartFerguson <16325469+StuartFerguson@users.noreply.github.com>
Fixed in commit eda45bb. The error occurred because in .NET 10 Blazor, layout components that receive Solution implemented:
This approach follows the recommended pattern: keep layouts static and make only specific child components interactive when needed. The dropdown should now work without the serialization error. |
|
@copilot ok the signout link now works however I have noticed a small issue that when i click signout, followed by sign in I am not prompted again for crededntials to log in |
Co-authored-by: StuartFerguson <16325469+StuartFerguson@users.noreply.github.com>
Fixed in commit 2f7c55a. The issue was that the OIDC provider was maintaining an active session, so when you clicked "Sign In" after logging out, it automatically re-authenticated without prompting for credentials. Changes made:
This forces the OIDC provider to always prompt for credentials on the login page, even if a session exists. Now when you sign out and then sign in again, you'll be required to enter your credentials. |



OIDC Authentication Flow Implementation - COMPLETE ✅
Based on the old EstateManagementUI app, successfully implemented OIDC authentication for the BlazorServer project:
Implementation Complete ✅
Key Features Implemented
Configuration
UI Features
Authentication Flow
prompt=loginparameter to force credential re-entryIssues Resolved
@onclick:stopPropagationand proper button event handlingReady for Testing
User can now test:
Original prompt
💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.