Frontegg

The Frontegg Developer Hub

Welcome to the Frontegg developer hub. You'll find comprehensive guides and documentation to help you start working with Frontegg as quickly as possible, as well as support if you get stuck. Let's jump right in!

Get Started

Add Audit Log

Overview of Audit Log

Frontegg supplies a fully-scalable, customizable, secure, multi-tenant audit log solution.

Management oversight and regulatory compliance mandate that every modification to your application be tracked and documented.

Frontegg’s advanced audit log provides comprehensive visibility into every modification of your application. Workflow oversight is simple, with customized views that can be easily exported into multiple formats.

By capturing every change to your product, you’ll have peace of mind that all modifications are documented -- allowing you to stay focused on your core business. Frontegg enables you to supply your customers with a fully managed, end-to-end audit log component (UI, Backend and Data Layer). You define the model, the UI theme and the UX. We take care of the rest.

Watch this video to learn more:

Add Audit Log Component

Follow these steps to add the Audit Log component to your app with just a few lines of code.

STEP 1: Configure Audit Log Data Structure

Log into the Frontegg portal and click:
Secure Accesss → Audit Logs → Start Integration/Configure

You can use our default audit log data structure or you can configure the data structure to match your specific needs.

STEP 2: Push Audit Logs

Use the code shown below to add a data record into the audit log.

import { AuditsClient } from '@frontegg/client'
// Init the audits SDK with the clientId and api key
const auditsClient = new AuditsClient();
await auditsClient.init('YOUR-CLIENT-ID', 'YOUR-API-KEY');

// Send the actual audit JSON (Match the model below to the one defined on the portal) 
await auditsClient.sendAudit({
    tenantId: 'THE-TENANT-ID', 
    user: '[email protected]', 
    resource: 'Portal', 
    action: 'Login', 
    severity: 'Info',
    ip: '68.132.6.137' 
});
from frontegg import FronteggClient
# Init the audits SDK with the clientId and api key
client = FronteggClient("your-client-id", "your-api-key")

# Send the actual audit JSON (Match the model below to the one defined on the portal) 
client.send_audits(
    {
        user: "[email protected]",
        resource: "Portal",
        action: "Login",
        severity: "Info",
        ip: "68.132.6.137",
    },
    tenantId="THE-TENANT-ID",
)

STEP 3: Add Audit Log Component to Your App

Run npm i @frontegg/react and add the following code to your app.

Note that the audit log component is already included in the Admin-box.

import React from 'react';
import { Audits } from '@frontegg/react'

const AuditLogWrapper = () => {
  return (
    <div>
      <Audits />
    </div>
  )
}

export default AuditLogWrapper;
import { NgModule } from '@angular/core';
import { Routes, RouterModule } from '@angular/router';
import { withFronteggRoutes } from '@frontegg/ng-core';
import { AuditsComponent } from '@frontegg/ng-audits';

const routes: Routes = withFronteggRoutes([
    {
    path: 'audits',
    component: AuditsComponent,
  },
]);

@NgModule({
  imports: [RouterModule.forRoot(routes)],
  exports: [RouterModule],
})
export class AppRoutingModule {
}

At this stage you should be able to see the fully managed audit table available on your UI. The table should display the data records you have pushed using "THE-TENANT-ID".

Automatic Audit Logs 📋

As part of our user management system, each user activity (signup, login, logout, team invites, etc…) is audited automatically, so your end users have traceability for every action done in your application. This is all in addition to the ability to send your own custom audits and complete a full blown audit log solution.

Updated 10 days ago


Add Audit Log


Suggested Edits are limited on API Reference Pages

You can only suggest edits to Markdown body content, but not to the API spec.