Skip to content

Conversation

@DevTKSS
Copy link

@DevTKSS DevTKSS commented Sep 6, 2025

TODO: Check if there is any non Uno.UI specific replacement for the WebAuthenticationResult with similar/same end result, to fix the type not found lintings?

Made the Handler specific Methods that use magic numbers (status, messages...) virtual so someone who would like to have other behaviour could simply override them and implement it with littlest effort

Added ErrorResponse Default uri key names of the official standard document and implemented in the OAuthCallbackHandler

Copilot AI review requested due to automatic review settings September 6, 2025 13:24

This comment was marked as outdated.

…an be already used build in

Made the Handler specific Methods that use magic numbers (status, messages...) virtual so someone who would like to have other behavior could simply override them and implement it with littlest effort

Added ErrorResponse Default uri key names of the official standard document and implemented in the OAuthCallbackHandler
TODO: Decide which of both Query checking Methods should be used
@DevTKSS
Copy link
Author

DevTKSS commented Sep 7, 2025

Updated to seperate Project and latest Registration Changes implemented for AuthCallbackHandler
TODO:

@carldebilly carldebilly requested a review from Copilot September 8, 2025 01:22
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR adds OAuth callback handler functionality to the Yllibed HTTP server library by creating a new Yllibed.Handlers.Uno project. The implementation provides a built-in handler for OAuth authentication callbacks that integrates with Uno.UI's WebAuthenticationResult.

Key changes:

  • Creates a new OAuthCallbackHandler class that implements OAuth callback processing
  • Adds dependency injection extensions for easy service registration
  • Implements OAuth error response handling according to RFC 6749 standards

Reviewed Changes

Copilot reviewed 12 out of 12 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
global.json Updates SDK configuration to include Uno.Sdk 6.2.29
Yllibed.Handlers.Uno/OAuthCallbackHandler.cs Main OAuth callback handler implementation with status code mapping and result processing
Yllibed.Handlers.Uno/IAuthCallbackHandler.cs Interface definition for authentication callback handlers
Yllibed.Handlers.Uno/Extensions/OAuthCallbackExtensions.cs Dependency injection extensions for registering OAuth callback handlers
Yllibed.Handlers.Uno/Extensions/UriExtensions.cs URI parameter parsing utilities for OAuth callback processing
Yllibed.Handlers.Uno/Defaults/OAuthErrorResponseDefaults.cs OAuth error response constants based on RFC 6749
Yllibed.Handlers.Uno/AuthCallbackHandlerOptions.cs Configuration options for the auth callback handler
Yllibed.Handlers.Uno/Yllibed.Handlers.Uno.csproj Project file for the new Uno handlers library
Comments suppressed due to low confidence (1)

Yllibed.Handlers.Uno/OAuthCallbackHandler.cs:1

  • This large commented-out code block should be removed rather than left as dead code. If this implementation might be needed later, consider documenting the decision in a comment or tracking it in an issue.
using Microsoft.Extensions.DependencyInjection;

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

@DevTKSS
Copy link
Author

DevTKSS commented Nov 12, 2025

Aligned with GuardExtensions, removed Keyed usage. While this could be a good addition, in case the user has multiple handlers needed and wants to use named options, it's more complicated since GetRequiredService<OAuthCallbackHandler> can not be used then, instead we would need to use GetRequiredKeyedService<OAuthCallbackHandler>, so no intermixing allowed from DI in this

@DevTKSS
Copy link
Author

DevTKSS commented Nov 12, 2025

Note

@DevTKSS DevTKSS requested a review from carldebilly November 12, 2025 13:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants