Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 21 additions & 0 deletions freebuff/web/src/app/onboard/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,27 @@ const Onboard = async ({ searchParams }: PageProps) => {
)
}

if (authCodeResolution.status === 'missing') {
logger.info(
{
authCodeLength: authCode.length,
authCodeTrimmedLength: authCode.trim().length,
authCodeHashPrefix: getCliAuthCodeHashPrefix(authCode),
isOpaqueAuthCodeToken: isOpaqueCliAuthCodeToken(authCode),
userId: user.id,
},
'Missing Freebuff CLI auth code token',
)

return (
<StatusCard
title="Login link expired"
description="This browser login link is no longer active."
message="Return to your terminal and restart Freebuff to generate a new login link."
/>
)
}

const {
authCode: resolvedAuthCode,
resolvedOpaqueToken,
Expand Down
10 changes: 10 additions & 0 deletions web/src/app/onboard/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,16 @@ const Onboard = async ({ searchParams }: PageProps) => {
)
}

if (authCodeResolution.status === 'missing') {
return (
<CardWithBeams
title="This login link has expired"
description="Return to your terminal and restart Codebuff to generate a new login link."
content={<p>You can close this browser window.</p>}
/>
)
}

const { authCode: resolvedAuthCode } = authCodeResolution
const { fingerprintId, expiresAt, receivedHash } =
parseAuthCode(resolvedAuthCode)
Expand Down
Loading