fix(oauth): brand the OAuth publisher link and show its domain - #657
Merged
Conversation
Kody Review CompleteGreat news! 🎉 Keep up the excellent work! 🚀 Kody Guide: Usage and ConfigurationInteracting with Kody
Current Kody ConfigurationReview OptionsThe following review options are enabled or disabled:
|
Code Coverage ReportTotal Coverage: 50.1% Generated from commit: 75f608e |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Shows the OAuth authorize page publisher as its bare domain (e.g.
publisher.example)while keeping the link pointed at the client metadata document.
Styles the publisher link with the Pinner teal accent instead of the browser-default
link color, matching the rest of the on-brand OOB pages.
Summary
This pull request improves the OAuth authorization page by branding the publisher link and displaying the publisher's domain instead of the full metadata URL.
Changes
Publisher Link Display
https://publisher.example/oauth-client.json) as the publisher link text.publisher.example) extracted from the URL, while thehrefstill points to the full metadata document.Implementation
clientURIHost()helper function that safely extracts the host portion from a validated client URI, returning an empty string for unparseable URLs.AuthorizeGETandAuthorizePOSThandlers to compute and pass the newClientDomainfield alongside the existingClientURI.Styling
brand-linkCSS utility that styles the publisher link with the accent teal color to match Pinner's branding, including hover, focus-visible, and visited states—ensuring it doesn't appear as a default browser link.Tests
brand-linkclass is applied.clientURIHost()covering various URL formats, ports, and invalid inputs.Impact
This change enhances the OAuth authorization page by making the publisher identity more recognizable to resource owners (showing a clean domain rather than a long metadata URL) and aligns the link styling with the overall Pinner visual identity.