Sfoglia il codice sorgente

fix(go): netclient SSO login;

Vishal Dalwadi 1 mese fa
parent
commit
dcdfe1dc35
2 ha cambiato i file con 1 aggiunte e 6 eliminazioni
  1. 0 5
      auth/auth.go
  2. 1 1
      auth/host_session.go

+ 0 - 5
auth/auth.go

@@ -3,7 +3,6 @@ package auth
 import (
 	"github.com/gravitl/netmaker/logic"
 	"github.com/gravitl/netmaker/models"
-	"golang.org/x/oauth2"
 )
 
 // == consts ==
@@ -11,10 +10,6 @@ const (
 	node_signin_length = 64
 )
 
-var (
-	auth_provider *oauth2.Config
-)
-
 func isUserIsAllowed(username, network string) (*models.User, error) {
 
 	user, err := logic.GetUser(username)

+ 1 - 1
auth/host_session.go

@@ -110,7 +110,7 @@ func SessionHandler(conn *websocket.Conn) {
 			return
 		}
 	} else { // handle SSO / OAuth
-		if logic.IsOAuthConfigured() {
+		if !logic.IsOAuthConfigured() {
 			err = conn.WriteMessage(messageType, []byte("Oauth not configured"))
 			if err != nil {
 				logger.Log(0, "error during message writing:", err.Error())