Skip to content

Commit 40d1a06

Browse files
authored
Merge pull request #250 from Gnathonic/feat/filesystem-provider
feat: OneDrive and Local Folder sync providers + Google Drive re-auth overhaul
2 parents c568f07 + ca669d4 commit 40d1a06

77 files changed

Lines changed: 10717 additions & 2562 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.env.example

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
# Google Drive sync (optional — omit to disable)
2+
VITE_GDRIVE_CLIENT_ID=
3+
VITE_GDRIVE_API_KEY=
4+
5+
# OneDrive sync (optional — omit to hide the OneDrive option)
6+
# Azure AD app registration with the deploy origin as an SPA redirect URI.
7+
VITE_ONEDRIVE_CLIENT_ID=

CLAUDE.md

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -250,14 +250,21 @@ Night mode applies a CSS `filter` to `<dialog>` elements (see `app.html`). The `
250250

251251
## Environment Variables
252252

253-
Create a `.env.local` file for Google Drive integration:
253+
Create a `.env.local` file for cloud provider integration:
254254

255255
```
256256
VITE_GDRIVE_CLIENT_ID=your_client_id
257257
VITE_GDRIVE_API_KEY=your_api_key
258+
VITE_ONEDRIVE_CLIENT_ID=your_azure_app_client_id
258259
```
259260

260-
These are only required for Google Drive sync. MEGA and WebDAV don't require env vars.
261+
- `VITE_GDRIVE_*`: required only for Google Drive sync.
262+
- `VITE_ONEDRIVE_CLIENT_ID`: required only for OneDrive sync. Register an
263+
Azure AD app (any Microsoft account tenant, "common" authority) and add the
264+
deploy origin as a **Single-page application** redirect URI. Scopes used:
265+
`Files.ReadWrite`, `offline_access`, `User.Read`. When unset, the OneDrive
266+
option is hidden from the cloud screen.
267+
- MEGA, WebDAV, and Local Folder require no env vars.
261268

262269
## Testing
263270

README.md

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -183,13 +183,18 @@ npm test
183183

184184
### Environment Variables
185185

186-
For Google Drive integration, create a `.env` file:
186+
For Google Drive and/or OneDrive integration, create a `.env` file:
187187

188188
```env
189189
VITE_GDRIVE_CLIENT_ID=your_client_id
190190
VITE_GDRIVE_API_KEY=your_api_key
191+
VITE_ONEDRIVE_CLIENT_ID=your_azure_app_client_id
191192
```
192193

194+
For OneDrive, register an Azure AD app ("common" authority) and add your deploy
195+
origin as a **Single-page application** redirect URI. When unset, the OneDrive
196+
option is hidden. MEGA, WebDAV, and Local Folder need no configuration.
197+
193198
## 💬 Community
194199

195200
Wanna chat with the devs? Share your hopes, dreams, and issues (with Mokuro Reader specifically)? Come join the [Mokuro Reader Discord](https://discord.gg/AU5pjjSQBw)!

0 commit comments

Comments
 (0)