diff --git a/backend/go-app/go.mod b/backend/go-app/go.mod index 2fa79b57..2a067a08 100644 --- a/backend/go-app/go.mod +++ b/backend/go-app/go.mod @@ -2,7 +2,7 @@ module shuffle go 1.13 -//replace github.com/frikky/shuffle-shared => ../../../../git/shuffle-shared +replace github.com/frikky/shuffle-shared => ../../../../git/shuffle-shared //replace github.com/frikky/kin-openapi => ../../../../git/kin-openapi @@ -12,6 +12,7 @@ require ( cloud.google.com/go/pubsub v1.3.1 cloud.google.com/go/storage v1.12.0 github.com/Masterminds/semver v1.5.0 // indirect + github.com/RobotsAndPencils/go-saml v0.0.0-20170520135329-fb13cb52a46b // indirect github.com/algolia/algoliasearch-client-go/v3 v3.18.1 // indirect github.com/basgys/goxml2json v1.1.0 github.com/bradfitz/slice v0.0.0-20180809154707-2b758aa73013 // indirect @@ -31,6 +32,8 @@ require ( github.com/gorilla/handlers v1.4.2 // indirect github.com/gorilla/mux v1.8.0 github.com/h2non/filetype v1.0.12 + github.com/kardianos/osext v0.0.0-20190222173326-2bc1f35cddc0 // indirect + github.com/nu7hatch/gouuid v0.0.0-20131221200532-179d4d0c4d8d // indirect github.com/patrickmn/go-cache v2.1.0+incompatible github.com/satori/go.uuid v1.2.0 go4.org v0.0.0-20201209231011-d4a079459e60 // indirect diff --git a/backend/go-app/main.go b/backend/go-app/main.go index 87e0eb9c..9423eadd 100644 --- a/backend/go-app/main.go +++ b/backend/go-app/main.go @@ -5866,6 +5866,7 @@ func initHandlers() { // Docker orborus specific - downloads an image r.HandleFunc("/api/v1/get_docker_image", getDockerImage).Methods("POST", "OPTIONS") r.HandleFunc("/api/v1/migrate_database", migrateDatabase).Methods("POST", "OPTIONS") + r.HandleFunc("/api/v1/login_sso", shuffle.HandleSSO).Methods("GET", "POST", "OPTIONS") // Important for email, IDS etc. Create this by: // PS: For cloud, this has to use cloud storage. diff --git a/frontend/src/App.jsx b/frontend/src/App.jsx index 3b48175a..488d766e 100644 --- a/frontend/src/App.jsx +++ b/frontend/src/App.jsx @@ -23,6 +23,7 @@ import Admin from "./views/Admin"; import Docs from "./views/Docs"; import Introduction from "./views/Introduction"; import SetAuthentication from "./views/SetAuthentication"; +import SetAuthenticationSSO from "./views/SetAuthenticationSSO"; import LandingPageNew from "./views/LandingpageNew"; import LoginPage from "./views/LoginPage"; @@ -127,6 +128,7 @@ const App = (message, props) => { } /> } /> } /> + } /> } /> diff --git a/frontend/src/components/Header.js b/frontend/src/components/Header.js index f62ec077..af9d272d 100644 --- a/frontend/src/components/Header.js +++ b/frontend/src/components/Header.js @@ -289,6 +289,10 @@ const Header = props => { }} > {userdata.orgs.map((data, index) => { + if (data.name === undefined || data.name === null || data.name.length === 0) { + return null + } + const imagesize = 22 const imageStyle = {width: imagesize, height: imagesize, pointerEvents: "none", marginRight: 10, marginLeft: data.creator_org !== undefined && data.creator_org.length > 0 ? 20 : 0} const image = data.image === "" ? diff --git a/frontend/src/views/LoginPage.jsx b/frontend/src/views/LoginPage.jsx index 542e331d..1b621751 100644 --- a/frontend/src/views/LoginPage.jsx +++ b/frontend/src/views/LoginPage.jsx @@ -299,13 +299,24 @@ const LoginDialog = props => { />
-
{loginInfo}
+ + Or + +
+ +
}