move oauth error handler to auth package

This commit is contained in:
Anish Mukherjee
2022-12-23 18:28:45 +05:30
parent 1a442aa299
commit 66efcf9eb3
8 changed files with 23 additions and 22 deletions

View File

@@ -100,8 +100,7 @@ func InitializeAuthProvider() string {
// Note: not included in API reference as part of the OAuth process itself.
func HandleAuthCallback(w http.ResponseWriter, r *http.Request) {
if auth_provider == nil {
w.Header().Set("Content-Type", "text/html; charset=utf-8")
_, _ = fmt.Fprintln(w, oauthNotConfigured)
handleOauthNotConfigured(w)
return
}
var functions = getCurrentAuthFunctions()