fixed minor bug surrounding oauth error

This commit is contained in:
0xdcarns
2021-10-28 10:20:37 -04:00
parent f7156551b2
commit 5322c44a99
3 changed files with 26 additions and 5 deletions

View File

@@ -29,11 +29,6 @@ func userHandlers(r *mux.Router) {
r.HandleFunc("/api/users", authorizeUserAdm(http.HandlerFunc(getUsers))).Methods("GET")
r.HandleFunc("/api/oauth/login", auth.HandleAuthLogin).Methods("GET")
r.HandleFunc("/api/oauth/callback", auth.HandleAuthCallback).Methods("GET")
r.HandleFunc("/api/oauth/error", throwOauthError).Methods("GET")
}
func throwOauthError(response http.ResponseWriter, request *http.Request) {
returnErrorResponse(response, request, formatError(errors.New("No token returned"), "unauthorized"))
}
// Node authenticates using its password and retrieves a JWT for authorization.