A deployable markdown editor that connects with your self hosted files and lets you edit in a beautiful interface

Fix GitHub OAuth provider selection issue

- Add provider=github query parameter in BeginAuth handler
- Add provider=github query parameter in CallbackAuth handler
- This fixes the 'you must select a provider' error from gothic
- Gothic needs the provider name in the request context

+10
+10
backend/internal/api/handlers/auth.go
··· 33 33 34 34 // BeginAuth starts the OAuth flow 35 35 func (h *AuthHandler) BeginAuth(w http.ResponseWriter, r *http.Request) { 36 + // Set the provider in the query string for gothic 37 + q := r.URL.Query() 38 + q.Add("provider", "github") 39 + r.URL.RawQuery = q.Encode() 40 + 36 41 // Get the auth URL from goth 37 42 gothic.BeginAuthHandler(w, r) 38 43 } 39 44 40 45 // CallbackAuth handles the OAuth callback 41 46 func (h *AuthHandler) CallbackAuth(w http.ResponseWriter, r *http.Request) { 47 + // Set the provider in the query string for gothic 48 + q := r.URL.Query() 49 + q.Add("provider", "github") 50 + r.URL.RawQuery = q.Encode() 51 + 42 52 // Complete OAuth flow 43 53 gothUser, err := gothic.CompleteUserAuth(w, r) 44 54 if err != nil {