mirror of
https://github.com/gravitl/netmaker.git
synced 2024-09-20 15:26:04 +08:00
remove callback error redirect
This commit is contained in:
parent
66efcf9eb3
commit
fe930c3ca8
|
@ -4,7 +4,6 @@ import (
|
||||||
"encoding/base64"
|
"encoding/base64"
|
||||||
"encoding/json"
|
"encoding/json"
|
||||||
"errors"
|
"errors"
|
||||||
"fmt"
|
|
||||||
"net/http"
|
"net/http"
|
||||||
"strings"
|
"strings"
|
||||||
|
|
||||||
|
@ -127,13 +126,7 @@ func HandleAuthCallback(w http.ResponseWriter, r *http.Request) {
|
||||||
// oauth
|
// oauth
|
||||||
func HandleAuthLogin(w http.ResponseWriter, r *http.Request) {
|
func HandleAuthLogin(w http.ResponseWriter, r *http.Request) {
|
||||||
if auth_provider == nil {
|
if auth_provider == nil {
|
||||||
var referer = r.Header.Get("referer")
|
handleOauthNotConfigured(w)
|
||||||
if referer != "" {
|
|
||||||
http.Redirect(w, r, referer+"login?oauth=callback-error", http.StatusTemporaryRedirect)
|
|
||||||
return
|
|
||||||
}
|
|
||||||
w.Header().Set("Content-Type", "text/html; charset=utf-8")
|
|
||||||
_, _ = fmt.Fprintln(w, oauthNotConfigured)
|
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
var functions = getCurrentAuthFunctions()
|
var functions = getCurrentAuthFunctions()
|
||||||
|
|
Loading…
Reference in a new issue