You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: .kilocode/rules/project-info-galgamemanager-server.md
+7Lines changed: 7 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -120,4 +120,11 @@ This `InformationalVersion` is then retrieved in C# using:
120
120
***Database Migrations:** Changes to server-side entities (like adding `PlayCount` to `Galgame.cs`) require new EF Core migrations to be created and applied to the database.
121
121
***DTO vs. Entity:** Understand the distinction between DTOs (for API communication, e.g., `GalgameUpdateDto`) and Entities (for database representation, e.g., `Galgame.cs`). AutoMapper is often used for mapping between them, but in this service, it's done manually for updates.
122
122
123
+
## 7. Hikarinagi OAuth Proxy
124
+
125
+
*`HikarinagiController` and `HikarinagiService` provide the confidential-server portion of Hikarinagi's Authorization Code flow with PKCE. The desktop client owns and verifies `state` and retains the PKCE verifier; the server stores the Hikarinagi client secret and exchanges authorization codes and refresh tokens.
126
+
* Configure `AppSettings:Hikarinagi:OAuth2Enable`, `ClientId`, `ClientSecret`, and `RedirectUri`. Enabling either the Hikarinagi catalog proxy or OAuth requires the client credentials; enabling OAuth also requires the redirect URI, normally `potato-vn://oauth-hikarinagi`.
127
+
* The authorization request uses scopes `status:write offline_access`, `prompt=consent`, and PKCE S256. Hikarinagi refresh tokens rotate, so every successful refresh response must be returned to the client and persisted in place of the previous token.
128
+
*`/server/info` advertises OAuth availability through `HikarinagiOAuth2Enable`. This flag is independent from the anonymous Hikarinagi catalog proxy setting.
129
+
123
130
This document provides a foundational knowledge base for the `GalgameManager.Server`. For specific implementation details, direct code analysis of the mentioned files and directories will be necessary.
0 commit comments