Thanks to visit codestin.com
Credit goes to github.com

Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,9 @@ WORKDIR /app
# Copy build files
COPY --from=build --chmod=0777 /app ./

# Ensure executable
RUN [ "node", "./dist/index.mjs", "--help" ]

# Needed for backwards compatibility
USER 0:0

Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
<br>

<p align="center">
<img src="https://raw.githubusercontent.com/voidauth/voidauth/refs/heads/main/docs/public/screenshots/2f8c15db-28fd-4b0e-a266-1dddd9cf9e3a.png" title="Login Portal" alt="Login Portal" width="240">
<img src="https://raw.githubusercontent.com/voidauth/voidauth/refs/heads/main/docs/public/screenshots/login_page.png" title="Login Portal" alt="Login Portal" width="280">
</p>

## What is VoidAuth
Expand Down
18 changes: 9 additions & 9 deletions docs/Getting-Started.md
Original file line number Diff line number Diff line change
Expand Up @@ -87,27 +87,29 @@ services:

## Configuration

### User and Client App
### Users and Apps

User and Client App (OIDC Client or ProxyAuth Domain) management is performed in the web interface. Please see the Admin Guides in the documentation sidebar for more information.
User and Client App (OIDC Client or ProxyAuth Domain) management is performed in the web interface. You can view the documentation on user management on the [User Management](User-Management.md) page.

To start setting up protected applications, there are two options available. If the application supports OIDC integration you can follow the instructions in the [OIDC Setup](OIDC-Setup.md) guide. If the application does not support OIDC or you just want to secure a specific path, you should follow the [ProxyAuth](ProxyAuth-and-Trusted-Header-SSO-Setup.md) guide.

### Environment Variables
VoidAuth is configurable primarily by environment variable. The available environment variables and their defaults are listed in the table below:

#### App Settings
| Name | Default | Description | Required | Recommended |
| :------ | :-- | :-------- | :--- | :--- |
| APP_URL | | URL VoidAuth will be served on. Must start with`https://`, subdirectory routing is supported. ex. `https://auth.example.com` or `https://example.com/auth` | 🔴 | |
| APP_URL | | URL of the web interface. ex. `https://auth.example.com` or `https://example.com/auth` | 🔴 | |
| STORAGE_KEY | | Storage encryption key for secret values such as keys and client secrets. Must be at least 32 characters long and should be randomly generated. If you do not enter one VoidAuth will recommend one to you. | 🔴 | |
| STORAGE_KEY_SECONDARY | | Secondary storage encryption key, used when rotating the primary storage encryption key. | | |
| SESSION_DOMAIN | `${APP_URL}` Base Domain | Domain of the VoidAuth Session Cookie. This is automatically set to the Base Domain of `${APP_URL}` but may be overridden here. Must be equal to or a higher level domain than `${APP_URL}` | | |
| DEFAULT_REDIRECT | `${APP_URL}` | The home/landing/app url for your domain. This is where users will be redirected upon accepting an invitation, logout, or clicking the logo when already on the auth home page. | | ✅ |
| DEFAULT_REDIRECT | `${APP_URL}` | The home/landing/app url for your domain. This is where users will be redirected upon accepting an invitation, logout, or clicking the header logo when already on the auth home page. | | ✅ |
| SIGNUP | `false` | Whether the app allows new users to self-register themselves without invitation. | | |
| SIGNUP_REQUIRES_APPROVAL | `true` | Whether new users who register themselves require approval by an admin. Setting this to **false** while **SIGNUP** is **true** enables open self-registration; use with caution! | | |
| EMAIL_VERIFICATION | `true` if SMTP_HOST is set, otherwise `false` | If true, users must have an email address and will get a verification email when changing their email address before it can be used. If you are using an email provider, this should probably be enabled. | | |
| EMAIL_VERIFICATION | `true` if SMTP_HOST is set, otherwise `false` | If true, users must have an email address and will get a verification email when changing their email address before it can be used. If you are using an email provider, this should probably be `true`. | | |
| MFA_REQUIRED | `false` | If true, users must use a second security factor while logging in such as an Authenticator Token or Passkey | | |
| API_RATELIMIT | `60` | Rate Limit for mutating (state-changing) requests per minute per IP address. Default is `60`, one per second. | | |
| ENABLE_DEBUG | `false` | Enables debug logging. WARNING! This will cause the activity of users to be printed in the logs | | |
| ENABLE_DEBUG | `false` | Enables debug logging. WARNING! This will cause the activity of users to be printed in the logs. | | |

#### App Customization
| Name | Default | Description | Required | Recommended |
Expand Down Expand Up @@ -176,12 +178,10 @@ For information on how to change the email templates used for invitations, passw
>
> <img width="260" src="/public/screenshots/66152d9b-b041-4374-91ec-4363ab1cb064.png" />

### Authentication
To start setting up protected applications, there are two options available. If the application supports OIDC integration you can follow the instructions in the [OIDC Setup](OIDC-Setup.md) guide. If the application does not support OIDC or you just want to secure a specific path, you should follow the [ProxyAuth](ProxyAuth-and-Trusted-Header-SSO-Setup.md) guide.

## Experimental
> [!WARNING]
> The following configurations are not well supported or tested, but may cover additional use-cases.

### Multi-Domain Protection
You can secure multiple domains you own by running multiple instances of VoidAuth using the same database. They should have the same **STORAGE_KEY** and **DB_\*** variables, but may otherwise have completely different configurations. The **APP_URL** variables of each would cover a different domain. If the domains you were trying to secure were `example.com` and `your-domain.net` you might set the **APP_URL** variables like `https://auth.example.com` and `https://id.your-domain.net`. These two instances would share everything in the shared DB, including users, OIDC clients, ProxyAuth Domains, etc.

Binary file added docs/public/screenshots/login_page.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion frontend/src/app/pages/admin/emails/emails.component.html
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<div class="container">
<span style="align-self: end">
<button mat-flat-button (click)="sendTestEmail()">Send Test Email</button>
<button [disabled]="!config?.emailActive" mat-flat-button (click)="sendTestEmail()">Send Test Email</button>
</span>
<table mat-table [dataSource]="dataSource" matSort>
@for (column of columns; track column) {
Expand Down
5 changes: 5 additions & 0 deletions frontend/src/app/pages/admin/emails/emails.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@ import DOMPurify from 'isomorphic-dompurify'
import { EmailInputComponent } from '../../../dialogs/email-input/email-input.component'
import { UserService } from '../../../services/user.service'
import type { CurrentUserDetails } from '@shared/api-response/UserDetails'
import type { ConfigResponse } from '@shared/api-response/ConfigResponse'
import { ConfigService } from '../../../services/config.service'

@Component({
selector: 'app-emails',
Expand Down Expand Up @@ -56,15 +58,18 @@ export class EmailsComponent {
private spinnerService = inject(SpinnerService)
private dialog = inject(MatDialog)
private userService = inject(UserService)
private configService = inject(ConfigService)

me?: CurrentUserDetails
public config?: ConfigResponse

async ngAfterViewInit() {
// Assign the data to the data source for the table to render
try {
this.spinnerService.show()

this.me = await this.userService.getMyUser()
this.config = await this.configService.getConfig()
await this.setData()

this.paginator().page.subscribe(async () => {
Expand Down
7 changes: 2 additions & 5 deletions frontend/src/app/pages/login/login.component.scss
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
mat-divider {
margin-top: 5rem;
margin-bottom: 3rem;
min-width: calc(var(--form-min-width) * 0.8);
max-width: calc(var(--form-max-width) * 0.8);
.form-card {
max-width: 400px;
}