Skip to content

Commit a039ffc

Browse files
Respect visible field in SSO provider configuration (#1948)
* hide SSO buttons when new visibility config is set to false * meln
1 parent adeb621 commit a039ffc

File tree

5 files changed

+10
-8
lines changed

5 files changed

+10
-8
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -207,7 +207,7 @@
207207
"luxon": "2.5.2",
208208
"memoize-one": "^5.2.1",
209209
"monaco-editor": "0.23.0",
210-
"neo4j-client-sso": "1.2.2",
210+
"neo4j-client-sso": "1.2.3",
211211
"neo4j-driver": "5.9.2",
212212
"re-resizable": "^6.9.9",
213213
"react": "^17.0.2",

src/browser/modules/Stream/Auth/ConnectForm.tsx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -372,7 +372,9 @@ export default function ConnectForm(props: ConnectFormProps): JSX.Element {
372372

373373
{props.authenticationMethod === SSO &&
374374
!SSOLoading &&
375-
SSOProviders.map((provider: SSOProvider) => (
375+
SSOProviders.filter(provider => {
376+
return 'visible' in provider ? provider.visible : true
377+
}).map((provider: SSOProvider) => (
376378
<StyledSSOButtonContainer key={provider.id}>
377379
<FormButton
378380
onClick={() => {

src/shared/modules/connections/connectionsDuck.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -477,6 +477,7 @@ export type SSOProvider = {
477477
}
478478
auth_endpoint: string
479479
well_known_discovery_uri: string
480+
visible: boolean
480481
}
481482

482483
export type DiscoverDataAction = {

src/shared/modules/discovery/discoveryHelpers.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@ import { pick } from 'lodash'
2121
import {
2222
DiscoveryResult,
2323
FetchError,
24-
NoProviderError,
2524
authLog,
2625
fetchDiscoveryDataFromUrl
2726
} from 'neo4j-client-sso'
@@ -93,7 +92,7 @@ type TaggedDiscoveryData = DiscoverableData & {
9392
source: DiscoveryDataSource
9493
urlMissing: boolean
9594
host: string
96-
onlyCheckForHost?: boolean
95+
onlyCheckForHost: boolean
9796
}
9897

9998
type DiscoveryDataSource =

yarn.lock

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10500,10 +10500,10 @@ neo-async@^2.5.0, neo-async@^2.6.1:
1050010500
resolved "https://registry.yarnpkg.com/neo-async/-/neo-async-2.6.2.tgz#b4aafb93e3aeb2d8174ca53cf163ab7d7308305f"
1050110501
integrity sha1-tKr7k+OustgXTKU88WOrfXMIMF8=
1050210502

10503-
10504-
version "1.2.2"
10505-
resolved "https://registry.yarnpkg.com/neo4j-client-sso/-/neo4j-client-sso-1.2.2.tgz#146f96ca8e23654c70e5bd5a7f98a3acb286ce2c"
10506-
integrity sha1-FG+Wyo4jZUxw5b1af5ijrLKGziw=
10503+
10504+
version "1.2.3"
10505+
resolved "https://registry.yarnpkg.com/neo4j-client-sso/-/neo4j-client-sso-1.2.3.tgz#e53da35442c57b76fa1d7a53bbbc9501f7b4de17"
10506+
integrity sha512-F/bZ8VfuNPNL68M6DiD3V4S6/ihdnAD8iEeR2rxqaZPPbch7KRO0PPGQqgkO7H+SaO1ayz9Q9ZYLifzxohossg==
1050710507
dependencies:
1050810508
file-saver "^2.0.5"
1050910509
jwt-decode "^3.1.2"

0 commit comments

Comments
 (0)