X-Git-Url: https://git.arvados.org/arvados-workbench2.git/blobdiff_plain/fc73adaad544e07a970f720fd1fec3d30821d4b1..3c7e3cdc547ad5468421e1c049daa94b0d4b8bc0:/src/views-components/login-form/login-form.tsx

diff --git a/src/views-components/login-form/login-form.tsx b/src/views-components/login-form/login-form.tsx
index 8ec856f9..e4ede79b 100644
--- a/src/views-components/login-form/login-form.tsx
+++ b/src/views-components/login-form/login-form.tsx
@@ -2,7 +2,7 @@
 //
 // SPDX-License-Identifier: AGPL-3.0
 
-import * as React from 'react';
+import React from 'react';
 import { useState, useEffect, useRef } from 'react';
 import { withStyles, WithStyles, StyleRulesCallback } from '@material-ui/core/styles';
 import CircularProgress from '@material-ui/core/CircularProgress';
@@ -10,8 +10,8 @@ import { Button, Card, CardContent, TextField, CardActions } from '@material-ui/
 import { green } from '@material-ui/core/colors';
 import { AxiosPromise } from 'axios';
 import { DispatchProp } from 'react-redux';
-import { saveApiToken } from '~/store/auth/auth-action';
-import { navigateToRootProject } from '~/store/navigation/navigation-action';
+import { saveApiToken } from 'store/auth/auth-action';
+import { navigateToRootProject } from 'store/navigation/navigation-action';
 
 type CssRules = 'root' | 'loginBtn' | 'card' | 'wrapper' | 'progress';
 
@@ -85,8 +85,8 @@ export const LoginForm = withStyles(styles)(
             handleSubmit(username, password)
             .then((response) => {
                 setSubmitting(false);
-                const apiToken = response.data.token;
-                if (apiToken) {
+                if (response.data.uuid && response.data.api_token) {
+                    const apiToken = `v2/${response.data.uuid}/${response.data.api_token}`;
                     dispatch<any>(saveApiToken(apiToken)).finally(
                         () => dispatch(navigateToRootProject));
                 } else {
