# Application Profile and Account: Login History Table

A sign-in audit table with timestamp, method, device, location, IP, and a result badge, plus a failed-attempt callout and a CSV export action.

- Page: https://www.shadcn-ui-blocks.com/blocks/application-pro/profile-account/login-history-table
- Collection: [Application](https://www.shadcn-ui-blocks.com/blocks/application-pro), Standard tier
- Group: [Profile and Account](https://www.shadcn-ui-blocks.com/blocks/application-pro/profile-account)
- Created: 2026-07-04
- Preview image: https://www.shadcn-ui-blocks.com/blocks/application-pro/profile-account/login-history-table.png

## Install

```bash
npx shadcn@latest add @shadcn-ui-blocks/application-pro-profile-account-login-history-table
```

Needs an API key from a Pro or Team plan: add `@shadcn-ui-blocks` to the registries in components.json with the key as an `Authorization: Bearer` header. Setup: https://www.shadcn-ui-blocks.com/docs/shadcn-cli. The MCP server installs it without the setup: https://www.shadcn-ui-blocks.com/docs/mcp.

## Depends on

- npm packages: class-variance-authority, lucide-react, radix-ui
- shadcn/ui components: badge, button, table
- Installs to: `@/components/blocks/application-pro/profile-account/login-history-table`

## About this block

Login History Table is the sign-in audit for an account:
a ruled table of recent authentication events, each with a
timestamp, the method and its icon (passkey, password with
2FA, SSO), the device and browser, a coarse location with
the IP, and a result badge. Success, Failed, and New
device read distinctly, and a failed-attempt callout sits
above the table beside a CSV export action.

Events are a typed const array; the result field drives
the badge styling, and a derived failedCount decides
whether the warning callout renders. The failed row from
an unfamiliar location is deliberate, it is the pattern
users need to recognize and act on.

## When to use

Reach for this block on the account security page, wired
to your auth log. Render the failed-attempt callout only
when a recent failure exists, and point its copy at your
password reset and session review flows.

A natural flow around it on an Application Pro page:

**Before**

- [Settings shell](https://www.shadcn-ui-blocks.com/blocks/application-pro/app-shells)
- [Two factor status](https://www.shadcn-ui-blocks.com/blocks/application-pro/profile-account)

**After**

- [Sessions settings](https://www.shadcn-ui-blocks.com/blocks/application-pro/settings-pages)
- [Activity feed](https://www.shadcn-ui-blocks.com/blocks/application-pro/activity)

## What you can display

One strong use is the personal sign-in audit. Other event
tables:

- **Admin audit log.** Widen to workspace-scoped events
  with the acting member on each row.
- **API access log.** Swap the method column for token
  names and the endpoint each call hit.
- **Consent history.** List permission grants and
  revocations with the app and scope per row.

> Tip: keep locations labeled approximate, an IP based
> guess that reads as fact sends users chasing sign-ins
> that were their own.

## More in Application Profile and Account

- [Account Overview Card](https://www.shadcn-ui-blocks.com/blocks/application-pro/profile-account/account-overview-card)
- [Account Switcher Blueprint](https://www.shadcn-ui-blocks.com/blocks/application-pro/profile-account/account-switcher-blueprint)
- [Activity Summary Card](https://www.shadcn-ui-blocks.com/blocks/application-pro/profile-account/activity-summary-card)
- [Away Status Card](https://www.shadcn-ui-blocks.com/blocks/application-pro/profile-account/away-status-card)
- [Change Password Card](https://www.shadcn-ui-blocks.com/blocks/application-pro/profile-account/change-password-card)
- [Connected Identities Card](https://www.shadcn-ui-blocks.com/blocks/application-pro/profile-account/connected-identities-card)
- [Danger Zone Card](https://www.shadcn-ui-blocks.com/blocks/application-pro/profile-account/danger-zone-card)
- [Data Download Card](https://www.shadcn-ui-blocks.com/blocks/application-pro/profile-account/data-download-card)
- [Edit Profile Form](https://www.shadcn-ui-blocks.com/blocks/application-pro/profile-account/edit-profile-form)
- [Email Addresses Card](https://www.shadcn-ui-blocks.com/blocks/application-pro/profile-account/email-addresses-card)
- [Notification Badge Row](https://www.shadcn-ui-blocks.com/blocks/application-pro/profile-account/notification-badge-row)
- [Preferences Summary](https://www.shadcn-ui-blocks.com/blocks/application-pro/profile-account/preferences-summary)
- [Profile Completion Card](https://www.shadcn-ui-blocks.com/blocks/application-pro/profile-account/profile-completion-card)
- [Profile Header](https://www.shadcn-ui-blocks.com/blocks/application-pro/profile-account/profile-header)
- [Public Profile Card](https://www.shadcn-ui-blocks.com/blocks/application-pro/profile-account/public-profile-card)
- [Sessions List Card](https://www.shadcn-ui-blocks.com/blocks/application-pro/profile-account/sessions-list-card)
- [Two Factor Status Card](https://www.shadcn-ui-blocks.com/blocks/application-pro/profile-account/two-factor-status-card)
