Skip to content

Commit

Permalink
Simplified logout command
Browse files Browse the repository at this point in the history
  • Loading branch information
bvaughn committed Jun 28, 2024
1 parent 56095b8 commit 04e3789
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions packages/replayio/src/commands/logout.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,12 @@ registerCommand("logout").description("Log out of your Replay account").action(l
async function logout() {
await logoutIfAuthenticated();

const { accessToken } = await getAccessToken();
if (accessToken) {
const name = process.env.REPLAY_API_KEY ? "REPLAY_API_KEY" : "RECORD_REPLAY_API_KEY";

const { accessToken, apiKeySource } = await getAccessToken();
if (accessToken && apiKeySource) {
console.log(
`You are now signed out but still authenticated via the ${highlight(name)} env variable`
`You have been signed out but you are still authenticated by the ${highlight(
apiKeySource
)} env variable`
);
} else {
console.log("You are now signed out");
Expand Down

0 comments on commit 04e3789

Please sign in to comment.