docs: auth providers and file size limitations (#743)

* feat: document file size and improve auth providers

* Minor text modifications

---------

Co-authored-by: Flomp <Flomp@users.noreply.github.com>
Co-authored-by: Christian Beutel <>
This commit is contained in:
Martin Schmidt
2026-02-12 14:00:15 +01:00
committed by GitHub
parent 47672c5a9d
commit c0be0629e3
6 changed files with 83 additions and 2 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 429 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 394 KiB

View File

@@ -0,0 +1,46 @@
---
title: Adjust Filesize Limits
description: Configure which file sizes are permitted
redirectFrom:
- /run/backend-configuration/#adjust-filelimits
---
import { Aside } from '@astrojs/starlight/components';
<span class="-tracking-[0.075em]">wanderer</span> brings several mechanisms which allow limiting the maximum file size of content provided by users.
Pictures in the users profile, trail highlights and gpx tracks fall under this file size limit.
<Aside>
As <span class="-tracking-[0.075em]">wanderer</span> runs parts of the logic in the users browser those limits can only be enforced, when trying to save a ressource.
This can lead to non-intuitive errors such as: editing and creating a trail, which is too large, is possible - saving it is not.
</Aside>
### Body Size Limit
The `BODY_SIZE_LIMIT` is a setting for the frontend, which fails requests if their payload is too large with an `500: Payload Too Large` error.
The standard value for this setting is `512kb`.
To adjust it, configure the `BODY_SIZE_LIMIT` [Environment Variable](../environment-configuration.md) to a value of you liking.
To disable this limit entirely you can set this variable to `Infinity`.
```sh
export BODY_SIZE_LIMIT=Infinity
```
<Aside type="tip">Read more about the limitations and configuration possibilities on the [SvelteKit Reference](https://svelte.dev/docs/kit/adapter-node#Environment-variables-BODY_SIZE_LIMIT).</Aside>
### Backend Filesize Verification
After the file passes the middleware, PocketBase does an additional verification on the file uploaded.
This verification includes a check for a maximum file size.
If this verification does not pass the request is terminated with a `500: error validation_file_size_limit`
![Pocketbase Filesize](../../../../assets/guides/pocketbase_filesize.png)
To change this behaviour open the PocketBase admin panel and navigate to the designated table.
Click the gear icon at the top to open the table's settings and select the gear icon in the row you want to change.
Adjust the `Max File Size` property.
<Aside>
The maximum file size has to be specified in bytes. The theoretical maximum of a single file attachment is ~8GB as specified by the [pocketbase documentation](https://pocketbase.io/docs/files-handling/)
</Aside>

View File

@@ -0,0 +1,33 @@
---
title: Configure Authentication Providers
description: Adjust login methods
redirectFrom:
- /run/backend-configuration/#auth-providers
---
### Create an OAuth app
This step will vary wildly from provider to provider. Please refer to your provider's documentation for the specific steps.
No matter your provider, you will need a redirect URL. This redirect URL must have the following format: `$ORIGIN/login/redirect`.
`$ORIGIN` refers to the `ORIGIN` environment variable that defines the public host at which your <span class="-tracking-[0.075em]">wanderer</span> instance can be reached.
So for the default installation, the redirect URL is `http://localhost:3000/login/redirect`.
In any case, once you have successfully created your OAuth app you will receive a Client ID and a Client Secret.
### Enable a provider in PocketBase
![Pocketbase OAuth](../../../../assets/guides/pocketbase_oauth.png)
In the PocketBase admin panel navigate to the `users` table. Click the gear icon at the top to open the table's settings and navigate to `Options`.
In the tab `OAuth2`, add your provider and fill in the Client ID and Client Secret from the step before and save your changes.
### Disable password authentication
After enabling the neccessary OAuth2 providers for your application you may want to disable the standard local password authentication.
![Pocketbase OAuth](../../../../assets/guides/pocketbase_password.png)
In the PocketBase admin panel navigate to the `users` table.
Click the gear icon at the top to open the table's settings and navigate to `Options`.
In the tab `Identity/Password`, toggle the switch and save the configuration.

View File

@@ -20,8 +20,9 @@ Via the online dashboard, you will now have access with the user "email@example.
For specific configuration guides see:
- [SMTP settings](./smtp/)
- [OAuth2 providers](./oauth2/)
- [Auth providers](./auth-providers/)
- [Backup server](./backup-server/)
- [Custom categories](./custom-categories/)
- [Adjust Filesize Limits](./adjust-filesize-limits/)
To learn more about what you can do in the admin dashboard please refer to PocketBase's [documentation](https://pocketbase.io/docs/).