AccountLogs Documentation
Overview
The AccountLogs component is designed to display user account information and a history of recent login activity within the Vantage analytics and data platform. This feature enhances user experience by providing transparency and quick access to vital account-related data. The component organizes user details and login timestamps in a structured format, making it easier for users to track their account activity.
Purpose
The primary purpose of the AccountLogs component is to enable users to view their account information and recent login events. It serves to increase security awareness by making users conscious of their login activities. Additionally, it is integrated into a broader analytics platform that may utilize usage data for insights or alerts regarding account access patterns.
Settings
The AccountLogs component operates with a set of inputs, derived primarily from the user object. Below is an exhaustive explanation of these inputs:
User Object Properties
-
First Name
- Input Type: String
- Description: Displays the user's first name. It allows users to identify their account easily.
- Default Value: N/A (dependent on user information).
-
Last Name
- Input Type: String
- Description: Displays the user's last name, providing a complete identification alongside the first name.
- Default Value: N/A (dependent on user information).
-
Email
- Input Type: String
- Description: Shows the user's primary email address. This is the contact point for account-related communications.
- Default Value: N/A (dependent on user information).
-
Organization Name
- Input Type: String
- Description: Displays the name of the organization if associated with the user account. If no organization is linked, it shows ‘N/A’.
- Default Value: N/A.
-
Username
- Input Type: String
- Description: Displays the username, which is the same as the user's primary email. This is useful for login identification.
- Default Value: N/A (equal to user.email).
-
User ID
- Input Type: String
- Description: Displays a unique identifier for the user within the platform. This IDs the user’s account distinctly across the system.
- Default Value: N/A (dependent on user information).
-
Login History
- Input Type: Array of Objects
- Description: An array where each object contains a login timestamp. This section lists all recent logins, showing a log of user activity for security reference.
- Default Value: An empty array if no logins are present.
Behavior and Appearance
As the properties change, the AccountLogs component adjusts dynamically:
- If there's no login history, it displays a message indicating “No recent logins found.”
- When user data is updated, the component re-renders to reflect the latest user details and login activities.
Data Expectations
The AccountLogs component expects the following structure in the user object:
{
"first_name": "John",
"last_name": "Doe",
"email": "john.doe@example.com",
"organization_name": "Example Inc.",
"id": "12345",
"login_history": [
{
"id": "log1",
"timestamp": "2023-10-01T12:00:00Z"
},
// ...additional login records
]
}Use Cases & Examples
Use Case 1: Account Security Monitoring
A business needs to ensure that all employees are aware of their login activity to prevent unauthorized access. The AccountLogs component can be integrated into the employee portal, where users can monitor their login history and receive alerts on dubious activities.
Use Case 2: Onboarding New Users
During the onboarding process, new users often want to verify their account information and history. The AccountLogs component allows them to view their names, emails, and recent logins to confirm a successful setup.
Example Configuration
For a specific scenario where an organization is onboarding new employees, the AccountLogs component can be configured as follows:
{
"user": {
"first_name": "Alice",
"last_name": "Smith",
"email": "alice.smith@example.com",
"organization_name": "Tech Co.",
"id": "54321",
"login_history": [
{
"id": "log1",
"timestamp": "2023-10-05T09:15:00Z"
},
{
"id": "log2",
"timestamp": "2023-10-06T11:20:00Z"
}
]
}
}In this example, Alice can clearly see her account information and login history, facilitating a seamless onboarding experience. As new logins occur, the component will dynamically update to reflect her most recent login activities.