batazor/go-auth

View on GitHub
handlers/oauth/google.go

Summary

Maintainability
A
35 mins
Test Coverage

Function googleCallback has 5 return statements (exceeds 4 allowed).
Open

func googleCallback(w http.ResponseWriter, r *http.Request) {
    w.Header().Set("Content-Type", "application/json")

    b, err := ioutil.ReadAll(r.Body)
    defer r.Body.Close()
Severity: Major
Found in handlers/oauth/google.go - About 35 mins to fix

    comment on exported var ClientID should be of the form "ClientID ..."
    Open

        // Get configuration
    Severity: Minor
    Found in handlers/oauth/google.go by golint

    exported var ClientSecret should have comment or be unexported
    Open

        ClientSecret = utils.Getenv("OAUTH_GOOGLE_CLIENT_SECRET", "YOUR_CLIENT_SECRET")
    Severity: Minor
    Found in handlers/oauth/google.go by golint

    There are no issues that match your filters.

    Category
    Status