@@ -437,8 +443,14 @@ const GDriveForm = formHelper(function(props){
const redirect = () => {
return props.onThirdPartyLogin("google");
};
- if(CONFIG.connections.length === 1){
+
+ if(CONFIG.connections.length === 1 && CONFIG.auto_connect === true){
redirect();
+ return (
+
@@ -457,6 +469,11 @@ const CustomForm = formHelper(function(props){
if(CONFIG.connections.length === 1 && CONFIG.auto_connect === true){
redirect();
+ return (
+
+ AUTHENTICATING ...
+
+ );
}
return (
diff --git a/server/router/session.go b/server/router/session.go
index 9b184fb7..5933f719 100644
--- a/server/router/session.go
+++ b/server/router/session.go
@@ -1,7 +1,6 @@
package router
import (
- "errors"
"github.com/mickael-kerjean/mux"
. "github.com/mickael-kerjean/nuage/server/common"
"github.com/mickael-kerjean/nuage/server/model"
@@ -110,7 +109,7 @@ func SessionOAuthBackend(ctx App, res http.ResponseWriter, req *http.Request) {
}
obj, ok := b.(interface{ OAuthURL() string })
if ok == false {
- sendErrorResult(res, errors.New("No backend authentication"))
+ sendErrorResult(res, NewError("No backend authentication ("+b.Info()+")", 500))
return
}
sendSuccessResult(res, obj.OAuthURL())