diff --git a/packages/bot-utils/src/utils.ts b/packages/bot-utils/src/utils.ts index 9aa3d81..3874616 100644 --- a/packages/bot-utils/src/utils.ts +++ b/packages/bot-utils/src/utils.ts @@ -255,10 +255,13 @@ traceroute jsdelivr.com from Paris --port 453 export const authHelpTexts = { preamble: `Authenticate with the Globalping API for higher measurements limits. -Available Commands: +**Available Commands:** +\`\`\` login Log in to your Globalping account logout Log out from your Globalping account - status Check the current authentication status`, + status Check the current authentication status +\`\`\` +`, usage: (rootCommand: string) => `${rootCommand} auth [command]`, flags: ' -h, --help Help for auth', }; diff --git a/packages/slack/src/auth.ts b/packages/slack/src/auth.ts index e52a0dc..85fcb93 100644 --- a/packages/slack/src/auth.ts +++ b/packages/slack/src/auth.ts @@ -286,7 +286,7 @@ export class OAuthClient { try { await this.slackClient.chat.postEphemeral({ token: installation?.bot?.token, - text: `Failed to authorize: ${callbackError}: ${errorDescription}`, + text: `Authentication failed: ${callbackError}: ${errorDescription}`, user: session.userId, channel: session.channelId, thread_ts: session.threadTs, @@ -340,7 +340,7 @@ export class OAuthClient { let message = ''; if (exchangeError) { this.logger.error(exchangeError, '/oauth/callback failed'); - message = `Failed to authorize: ${exchangeError.error}: ${exchangeError.error_description}`; + message = `Authentication failed: ${exchangeError.error}: ${exchangeError.error_description}`; } else { message = 'Success! You are now authenticated.'; } diff --git a/packages/slack/src/post.ts b/packages/slack/src/post.ts index d6ffc1c..13b0d55 100644 --- a/packages/slack/src/post.ts +++ b/packages/slack/src/post.ts @@ -137,7 +137,7 @@ async function authLogin(client: WebClient, payload: ChannelPayload) { type: 'section', text: { type: 'mrkdwn', - text: `Click <${res.url}|here> to authenticate`, + text: `Please <${res.url}|click here> to authenticate.`, }, }, ], @@ -161,7 +161,7 @@ async function authStatus(client: WebClient, payload: ChannelPayload) { } text = introspection && introspection.active - ? `Logged in as ${introspection?.username}` + ? `Logged in as ${introspection?.username}.` : 'Not logged in.'; await client.chat.postEphemeral({ text,