1 // Copyright (C) The Arvados Authors. All rights reserved.
3 // SPDX-License-Identifier: AGPL-3.0
5 import * as React from 'react';
6 import { connect } from 'react-redux';
7 import { RootState } from '~/store/store';
8 import { AuthState } from '~/store/auth/auth-reducer';
9 import { getSaltedToken } from '~/store/auth/auth-action-session';
11 export interface FedLoginProps {
15 const mapStateToProps = ({ auth }: RootState) => ({ auth });
17 export const FedLogin = connect(mapStateToProps)(
18 class extends React.Component<FedLoginProps> {
20 const auth = this.props.auth;
21 const remoteHostsConfig = auth.remoteHostsConfig;
22 if (!auth.user || !auth.user.uuid.startsWith(auth.homeCluster)) {
26 {Object.keys(remoteHostsConfig)
27 .filter((k) => k !== auth.homeCluster)
28 .map((k) => <iframe key={k} src={"https://" + remoteHostsConfig[k].workbench2Url} style={{ visibility: "hidden" }} />)}