Azure / Azure/static-web-apps

Add Branding to BasicAuth

Open
#906 1 comment 7 reactions 0 assignees View on GitHub
enhancement triaged
Dominant language
No language data
Stars
346
Forks
67
PR merge metrics
No merged PRs in 30d

Description

**Overview**
Basic Auth is, you know, basic. But it would be nice to be able to inject a little bit of branding onto the login page.

Current BasicAuth page
![image](https://user-images.githubusercontent.com/10520771/188031899-c7e65004-12be-4aa0-b142-6f868bf0367e.png)

Potential:
![image](https://user-images.githubusercontent.com/10520771/188032563-f458f066-3c7e-49e0-9436-ec123c3b8346.png)

**Describe the solution you'd like**
Adding some branding / customization to the page. For instance:
- background color / image
- a placeholder for a logo / branding image
- or be able to provide azure your own page and deploy it to `/.auth/basicAuth/login`

OR

Ability to define basic auth like the rest of the auth providers:
```
{
"routes": [
{
"route": "/*",
"allowedRoles": ["authenticated"]
}
],
"responseOverrides": {
"401": {
"statusCode": 302,
"redirect": "/.auth/login/aad"
}
}
}
```
`staticwebapp.config.json`
https://docs.microsoft.com/en-us/azure/static-web-apps/configuration#restricting-access-to-entire-application

Because as it stands, basicAuth doesn't have any customization options or ability to apply it on selected routes, making it very difficult to wrap your own branding into the site.

**Describe alternatives you've considered**
1. Writing our own authentication. We just need something super simple like basic auth and not an identity service like AAD, GitHub or Google. A simple password protection is sufficient.

2. Wrapping the `/.auth/basicAuth/login` page in an iframe and serving our own page instead

3. Attempting to overwrite basicAuth and add a public page before the application that has branding. User will click "continue" and then get the basicAuth page.

**Additional context**
Azure Static Web Apps:
![image](https://user-images.githubusercontent.com/10520771/188030989-1ac9cf1b-8332-45a4-b17f-fb9fbdea6216.png)

if we added some branding config:
- background image or color
- logo / image

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.