16159: Passes the token to be expire when calling the logout endpoint.
[arvados-workbench2.git] / src / services / auth-service / auth-service.ts
index 8d27b5bbe88991a255c56fe92db6461965133c25..bd4bc1969c5004d1506f39b3d5a233d748d2fa57 100644 (file)
@@ -103,9 +103,9 @@ export class AuthService {
         window.location.assign(`https://${homeClusterHost}/login?${(uuidPrefix !== homeCluster && homeCluster !== loginCluster) ? "remote=" + uuidPrefix + "&" : ""}return_to=${currentUrl}`);
     }
 
-    public logout() {
+    public logout(expireToken: string) {
         const currentUrl = `${window.location.protocol}//${window.location.host}`;
-        window.location.assign(`${this.baseUrl || ""}/logout?return_to=${currentUrl}`);
+        window.location.assign(`${this.baseUrl || ""}/logout?api_token=${expireToken}&return_to=${currentUrl}`);
     }
 
     public getUserDetails = (showErrors?: boolean): Promise<User> => {