X-Git-Url: https://git.arvados.org/arvados-workbench2.git/blobdiff_plain/640e9ba2d458a1bdaadea09dfe2c92816601709d..d53a08ea0cc9a9af1a3071969d41165e8a6ff5d5:/src/views/workbench/fed-login.tsx

diff --git a/src/views/workbench/fed-login.tsx b/src/views/workbench/fed-login.tsx
index be543a64..595f136b 100644
--- a/src/views/workbench/fed-login.tsx
+++ b/src/views/workbench/fed-login.tsx
@@ -2,12 +2,12 @@
 //
 // SPDX-License-Identifier: AGPL-3.0
 
-import * as React from 'react';
+import React from 'react';
 import { connect } from 'react-redux';
-import { RootState } from '~/store/store';
-import { User } from "~/models/user";
-import { getSaltedToken } from '~/store/auth/auth-action-session';
-import { Config } from '~/common/config';
+import { RootState } from 'store/store';
+import { User } from "models/user";
+import { getSaltedToken } from 'store/auth/auth-action-session';
+import { Config } from 'common/config';
 
 export interface FedLoginProps {
     user?: User;
@@ -30,20 +30,19 @@ export const FedLogin = connect(mapStateToProps)(
             if (!apiToken || !user || !user.uuid.startsWith(localCluster)) {
                 return <></>;
             }
-            const [, tokenUuid, token] = apiToken.split("/");
             return <div id={"fedtoken-iframe-div"}>
                 {Object.keys(remoteHostsConfig)
                     .map((k) => {
                         if (k === localCluster) {
-                            return;
+                            return null;
                         }
                         if (!remoteHostsConfig[k].workbench2Url) {
                             console.log(`Cluster ${k} does not define workbench2Url.  Federated login / cross-site linking to ${k} is unavailable.  Tell the admin of ${k} to set Services->Workbench2->ExternalURL in config.yml.`);
-                            return;
+                            return null;
                         }
                         const fedtoken = (remoteHostsConfig[k].loginCluster === localCluster)
-                            ? apiToken : getSaltedToken(k, tokenUuid, token);
-                        return <iframe key={k} src={`${remoteHostsConfig[k].workbench2Url}/fedtoken?api_token=${fedtoken}`} style={{
+                            ? apiToken : getSaltedToken(k, apiToken);
+                        return <iframe key={k} title={k} src={`${remoteHostsConfig[k].workbench2Url}/fedtoken?api_token=${fedtoken}`} style={{
                             height: 0,
                             width: 0,
                             visibility: "hidden"
