11import type { Server } from 'node:http' ;
22import type { AddressInfo } from 'node:net' ;
33
4+ import chalk from 'chalk' ;
45import computerName from 'computer-name' ;
56import cors from 'cors' ;
67import express from 'express' ;
@@ -11,6 +12,7 @@ import { cryptoRandomObjectId } from '@apify/utilities';
1112
1213import { ApifyCommand } from '../lib/command-framework/apify-command.js' ;
1314import { Flags } from '../lib/command-framework/flags.js' ;
15+ import { AUTH_FILE_PATH } from '../lib/consts.js' ;
1416import { error , info , success } from '../lib/outputs.js' ;
1517import { useApifyIdentity } from '../lib/telemetry.js' ;
1618import { getLocalUserInfo , getLoggedClient } from '../lib/utils.js' ;
@@ -30,7 +32,7 @@ const tryToLogin = async (token: string) => {
3032 if ( isUserLogged ) {
3133 await useApifyIdentity ( userInfo . id ! ) ;
3234 success ( {
33- message : `You are logged in to Apify as ${ userInfo . username || userInfo . id } ! ` ,
35+ message : `You are logged in to Apify as ${ userInfo . username || userInfo . id } . ${ chalk . gray ( `Your token is stored at ${ AUTH_FILE_PATH ( ) } .` ) } ` ,
3436 } ) ;
3537 } else {
3638 error ( {
@@ -44,7 +46,7 @@ export class LoginCommand extends ApifyCommand<typeof LoginCommand> {
4446 static override name = 'login' as const ;
4547
4648 static override description =
47- `Authenticates your Apify account and saves credentials to '~/.apify '.\n` +
49+ `Authenticates your Apify account and saves credentials to '${ AUTH_FILE_PATH ( ) } '.\n` +
4850 `All other commands use these stored credentials.\n\n` +
4951 `Run 'apify logout' to remove authentication.` ;
5052
0 commit comments