The OBP OIDC Provider displays the Open Bank Project logo by default on the login page. You can customize this to use your own logo to brand the authentication experience with your organization's logo.
Two environment variables control the logo display:
| Variable | Required | Default | Description |
|---|---|---|---|
LOGO_URL |
No | https://static.openbankproject.com/images/OBP/OBP_Horizontal_2025.png |
URL to your logo image |
LOGO_ALT_TEXT |
No | "Open Bank Project" |
Alternative text for accessibility |
By default, the Open Bank Project logo is displayed. No configuration is required.
export LOGO_URL="https://example.com/logo.png"
export LOGO_ALT_TEXT="Company Logo"
mvn exec:java -Dexec.mainClass="com.tesobe.oidc.server.OidcServer"LOGO_URL="https://example.com/logo.png" \
LOGO_ALT_TEXT="Company Logo" \
mvn exec:java -Dexec.mainClass="com.tesobe.oidc.server.OidcServer"Uncomment and modify the logo configuration section in run-server.sh:
# Logo Configuration (Optional - defaults shown)
# Uncomment and change to use a custom logo
#export LOGO_URL="https://example.com/logo.png"
#export LOGO_ALT_TEXT="Company Logo"Then run:
./run-server.sh- Format: Any web-compatible format (PNG, SVG, JPG, GIF)
- Recommended Format: PNG or SVG for best quality
- Maximum Display Width: 200px (desktop), 150px (mobile)
- Maximum Display Height: 80px (desktop), 60px (mobile)
- Aspect Ratio: Maintained automatically
- File Size: Keep under 100KB for fast loading
For best results, use a logo with these characteristics:
- Horizontal Logo: 200px × 60px (recommended)
- Square Logo: 80px × 80px
- Vertical Logo: 100px × 80px
The logo will automatically scale to fit within the maximum dimensions while maintaining its aspect ratio.
The logo is displayed: Logo Display:
- ✅ On the main login page (
/obp-oidc/auth) - ✅ Above the "Sign In" heading
- ✅ Centered in the login container
- ✅ In both development and production modes
- ✅ By default (OBP logo) unless customized or disabled
- ✅ Clickable - links back to the origin domain of the application
The logo is clickable and links back to the origin domain of the redirect URI. This allows users to return to the calling application.
How it works:
- Extracts the domain from the OAuth
redirect_uriparameter - Creates a link to:
scheme://host:port(e.g.,https://portal.example.com:5174) - Hover effect: Logo slightly scales and fades for visual feedback
- Title attribute shows: "Return to [Client Name]"
Examples:
| Redirect URI | Logo Links To |
|---|---|
http://localhost:5174/login/callback |
http://localhost:5174 |
https://portal.example.com/oauth/callback |
https://portal.example.com |
https://api.bank.com:8080/auth/callback |
https://api.bank.com:8080 |
This provides an intuitive way for users to cancel authentication and return to the application.
To remove the logo entirely, set LOGO_URL to an empty string:
export LOGO_URL=""
mvn exec:java -Dexec.mainClass="com.tesobe.oidc.server.OidcServer"The logo will not appear if:
LOGO_URLis set to an empty string (intentionally disabled)- The image URL is invalid or unreachable
No error is shown - the login page simply displays without a logo.
# Simply start the server - OBP logo displays by default
mvn exec:java -Dexec.mainClass="com.tesobe.oidc.server.OidcServer"Default values:
- URL:
https://static.openbankproject.com/images/OBP/OBP_Horizontal_2025.png - Alt Text: "Open Bank Project"
export LOGO_URL="https://mycompany.com/logo.png"
export LOGO_ALT_TEXT="My Company Inc."
mvn exec:java -Dexec.mainClass="com.tesobe.oidc.server.OidcServer"If serving from a static file server:
export LOGO_URL="http://localhost:8000/company-logo.png"
export LOGO_ALT_TEXT="My Company"For small logos, you can use base64 encoding:
export LOGO_URL="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUA..."
export LOGO_ALT_TEXT="Company Logo"export LOGO_URL="https://cdn.mycompany.com/assets/logo.svg"
export LOGO_ALT_TEXT="MyCompany Inc."export LOGO_URL=""
mvn exec:java -Dexec.mainClass="com.tesobe.oidc.server.OidcServer"The LOGO_ALT_TEXT should:
-
Be Descriptive: Describe what the logo represents
- ✅ Good: "Open Bank Project" (default)
- ✅ Good: "Acme Corporation"
- ❌ Bad: "Logo"
- ❌ Bad: "Image"
-
Be Concise: Keep it short and meaningful
- ✅ Good: "MyCompany Banking"
- ❌ Bad: "The official logo of MyCompany Banking Corporation established in 1999"
-
Match Context: Reflect what users see
- If logo includes text, use that text
- If logo is symbolic, describe it briefly
The logo is properly marked up with:
<img src="[LOGO_URL]" alt="[LOGO_ALT_TEXT]" />Screen readers will announce the alt text, helping visually impaired users understand which organization they're logging into.
Problem: Logo doesn't appear on the login page.
Solutions:
-
Check if LOGO_URL is set or disabled:
echo $LOGO_URL
- If empty string (
""), logo is intentionally disabled - If unset, default OBP logo should display
- If set to custom URL, verify the URL is correct
- If empty string (
-
Verify URL is accessible:
curl -I $LOGO_URLShould return HTTP 200.
-
Check browser console: Open developer tools and look for image loading errors.
-
Test URL directly: Paste the URL in a browser to ensure the image loads.
Problem: Logo appears with incorrect size.
Solutions:
-
For too large: The CSS automatically limits the size. If it's still too large, your image might be very high resolution. Consider resizing the source image.
-
For too small: If your logo is very small and looks pixelated, use a higher resolution source image (at least 200px wide for horizontal logos).
-
Aspect ratio issues: The system maintains aspect ratio. If you want different proportions, edit the source image.
Problem: Browser shows mixed content warning (HTTPS page loading HTTP image).
Solution: If your OIDC server runs on HTTPS, ensure LOGO_URL also uses HTTPS:
# ❌ Wrong (HTTP logo on HTTPS site)
export LOGO_URL="http://example.com/logo.png"
# ✅ Correct (HTTPS logo on HTTPS site)
export LOGO_URL="https://example.com/logo.png"Problem: Logo fails to load due to CORS policy.
Solution: Ensure the server hosting your logo allows cross-origin requests. Add these headers to your logo hosting server:
Access-Control-Allow-Origin: *
Access-Control-Allow-Methods: GET
The logo is styled with the .login-logo class defined in /static/css/forms.css:
.login-logo {
text-align: center;
margin-bottom: 30px;
}
.login-logo a {
display: inline-block;
transition:
opacity 0.2s ease,
transform 0.2s ease;
}
.login-logo a:hover {
opacity: 0.8;
transform: scale(1.02);
}
.login-logo img {
max-width: 200px;
max-height: 80px;
height: auto;
width: auto;
display: block;
}
/* Mobile responsive */
@media (max-width: 768px) {
.login-logo a:hover {
transform: scale(1.01);
}
.login-logo img {
max-width: 150px;
max-height: 60px;
}
}If you need custom styling (not recommended, but possible):
- Edit
src/main/resources/static/css/forms.css - Modify the
.login-logoor.login-logo imgselectors - Rebuild the project
-
Start the server with default logo (no configuration needed):
./run-server.sh
The OBP logo should display automatically.
-
Start the server with custom logo:
export LOGO_URL="https://example.com/custom-logo.png" export LOGO_ALT_TEXT="Custom Company" ./run-server.sh
-
Navigate to login page: Visit the auth endpoint with test parameters:
http://localhost:9000/obp-oidc/test-login -
Verify logo appears:
- Logo should be centered above "Sign In"
- Image should be properly sized
- Alt text should be present (right-click image → Inspect)
-
Test disabling the logo:
export LOGO_URL="" ./run-server.sh
Login page should display without any logo.
- Open the login page in a browser
- Open Developer Tools (F12)
- Toggle device toolbar (Ctrl+Shift+M)
- Test different screen sizes:
- Desktop (1920×1080): Logo max 200×80px
- Tablet (768×1024): Logo max 200×80px
- Mobile (375×667): Logo max 150×60px
- Use CDN: Host your logo on a CDN for faster loading
- Optimize Image: Compress your logo to reduce file size
- Use SVG: For logos that scale well, SVG provides the best quality and smallest size
- Cache Headers: Ensure your logo server sends proper cache headers
- Use HTTPS: Always serve logos over HTTPS in production
- Trusted Sources: Only use logo URLs from domains you control
- Content Security Policy: If using CSP, ensure logo domain is whitelisted
- Consistent Logo: Use the same logo across all authentication flows
- White Background: Ensure your logo works well on a white background (the login container is white)
- Test Visibility: Verify logo is visible and clear at the display size
src/main/scala/com/tesobe/oidc/config/Config.scala- Configuration loadingsrc/main/scala/com/tesobe/oidc/endpoints/AuthEndpoint.scala- Logo renderingsrc/main/resources/static/css/forms.css- Logo stylingrun-server.sh- Example configurationREADME.md- General documentation
For issues or questions about logo configuration:
- Check this documentation first
- Review the Troubleshooting section
- Examine browser console for errors
- Verify your image URL is accessible
- Check that environment variables are set correctly
- ✅ Initial logo configuration support
- ✅ Default OBP logo displayed out-of-the-box
- ✅ Responsive design (desktop and mobile)
- ✅ Accessibility support with alt text
- ✅ Can be customized or disabled via environment variables
- ✅ Automatic image scaling
- ✅ Clickable logo that links back to calling application origin