-
+
+
+ Top Auth Methods
+
+
+
+
+
Top Browsers
-
@@ -441,10 +434,13 @@ export default function Auth0Dashboard() {
Top Devices
-
@@ -463,21 +459,35 @@ export default function Auth0Dashboard() {
-
-
-
+
+
+ Daily Login Fails
+
+
+
+
+
diff --git a/apps/web/src/components/tools/auth0/dau-chart.tsx b/apps/web/src/components/tools/auth0/dau-chart.tsx
index bfb4139..a4f0ee0 100644
--- a/apps/web/src/components/tools/auth0/dau-chart.tsx
+++ b/apps/web/src/components/tools/auth0/dau-chart.tsx
@@ -1,109 +1,23 @@
"use client"
-import {
- Card,
- CardContent,
- CardHeader,
- CardTitle,
-} from "@/components/ui/card"
-import {
- ChartContainer,
- ChartTooltip,
- ChartConfig,
- ChartTooltipContent
-} from "@/components/ui/chart"
-import { Line, LineChart, XAxis, YAxis, CartesianGrid } from "recharts"
-import { format } from "date-fns"
+import { AreaChart } from '@tinybirdco/charts'
-export interface DauDataPoint {
- day: string
- active: number
-}
-
-export interface DauChartData {
- data: DauDataPoint[]
- comparisonData?: DauDataPoint[]
- timeRange: 'hourly' | 'daily' | 'monthly'
- className?: string
-}
-
-const chartConfig = {
- active: {
- color: "hsl(var(--chart-1))",
- label: "Active Users",
- },
-} satisfies ChartConfig
-
-export function DauChart({ data, timeRange, className }: DauChartData) {
- return (
-
-
- Active Users
-
-
-
-
-
- {
- const date = new Date(value)
- return timeRange === 'monthly'
- ? format(date, 'MMM yyyy')
- : value.split('-')[2]
- }}
- label={{
- value: timeRange === 'monthly' ? "Month of Year" : "Day of Month",
- position: "bottom",
- offset: 20
- }}
- />
-
- }
- />
-
-
-
-
-
- )
-}
+export function Auth0Dau(params: {
+ client_id?: string
+ connection_id?: string
+ tenant_name?: string
+ token?: string
+ date_from?: string
+ date_to?: string
+ time_range?: string
+}) {
+ return
+}
\ No newline at end of file
diff --git a/apps/web/src/components/tools/auth0/top-browsers-chart.tsx b/apps/web/src/components/tools/auth0/top-browsers-chart.tsx
index 959be5c..76f2ddb 100644
--- a/apps/web/src/components/tools/auth0/top-browsers-chart.tsx
+++ b/apps/web/src/components/tools/auth0/top-browsers-chart.tsx
@@ -1,72 +1,33 @@
-import { BarChart, Bar, XAxis, YAxis } from 'recharts'
-import { ChartContainer, ChartTooltip, ChartConfig, ChartTooltipContent } from '@/components/ui/chart'
+'use client'
-interface Browser {
- browser: string
- request_count: number
-}
+import { BarList } from '@tinybirdco/charts'
-interface TopBrowsersChartProps {
- data: Browser[]
- isLoading: boolean
- className?: string
-}
-
-const chartConfig = {
- request_count: {
- color: "hsl(var(--primary))",
- label: "Requests",
- },
-} satisfies ChartConfig
-
-function transformData(data: Browser[]): (Browser & { fill: string })[] {
- return data.map((item, index) => ({
- ...item,
- fill: `hsl(var(--chart-${(index % 12) + 1}))`
- }));
-}
-
-export function TopBrowsersChart({ data, isLoading, className }: TopBrowsersChartProps) {
- if (isLoading) return Loading...
- if (!data.length) return No data available
-
- data = transformData(data)
-
- return (
-
-
-
-
- }
- cursor={{ fill: "hsl(var(--muted))", opacity: 0.2 }}
- />
-
-
-
- )
-}
\ No newline at end of file
+export function Auth0TopBrowsers(params: {
+ client_id?: string
+ connection_id?: string
+ tenant_name?: string
+ token?: string
+ date_from?: string
+ date_to?: string
+}) {
+ return (
+ {label}
+ )
+ }}
+ categoryConfig={{
+ request_count: {
+ label: Requests
+ }
+ }}
+ />
+}
\ No newline at end of file
diff --git a/apps/web/src/components/tools/auth0/top-devices-chart.tsx b/apps/web/src/components/tools/auth0/top-devices-chart.tsx
index 5c608e2..bc4c5ee 100644
--- a/apps/web/src/components/tools/auth0/top-devices-chart.tsx
+++ b/apps/web/src/components/tools/auth0/top-devices-chart.tsx
@@ -1,72 +1,33 @@
-import { BarChart, Bar, XAxis, YAxis } from 'recharts'
-import { ChartConfig, ChartTooltip, ChartTooltipContent, ChartContainer } from '@/components/ui/chart'
-interface Device {
- device: string
- request_count: number
-}
+'use client'
-interface TopDevicesChartProps {
- data: Device[]
- isLoading: boolean
- className?: string
-}
+import { BarList } from '@tinybirdco/charts'
-const chartConfig = {
- request_count: {
- color: "hsl(var(--chart-1))",
- label: "Requests",
- },
-} satisfies ChartConfig
-
-function transformData(data: Device[]): (Device & { fill: string })[] {
- return data.map((item, index) => ({
- ...item,
- fill: `hsl(var(--chart-${(index % 12) + 1}))`
- }));
-}
-
-export function TopDevicesChart({ data, isLoading, className }: TopDevicesChartProps) {
- if (isLoading) return Loading...
- if (!data.length) return No data available
-
- data = transformData(data)
-
- return (
-
-
-
-
- }
- cursor={{ fill: "hsl(var(--muted))", opacity: 0.2 }}
- />
-
-
-
- )
-}
\ No newline at end of file
+export function Auth0TopDevices(params: {
+ client_id?: string
+ connection_id?: string
+ tenant_name?: string
+ token?: string
+ date_from?: string
+ date_to?: string
+}) {
+ return (
+ {label}
+ )
+ }}
+ categoryConfig={{
+ request_count: {
+ label: Requests
+ }
+ }}
+ />
+}
\ No newline at end of file
diff --git a/apps/web/src/components/tools/auth0/top-domains-chart.tsx b/apps/web/src/components/tools/auth0/top-domains-chart.tsx
index d514577..dc94a7e 100644
--- a/apps/web/src/components/tools/auth0/top-domains-chart.tsx
+++ b/apps/web/src/components/tools/auth0/top-domains-chart.tsx
@@ -1,75 +1,33 @@
-import { BarChart, Bar, XAxis, YAxis } from 'recharts'
-import { ChartConfig, ChartTooltip, ChartTooltipContent, ChartContainer } from '@/components/ui/chart'
+'use client'
-interface Domain {
- domain: string
- request_count: number
- unique_emails: number
-}
+import { BarList } from '@tinybirdco/charts'
-interface TopDomainsChartProps {
- data: Domain[]
- isLoading: boolean
- className?: string
-}
-
-const chartConfig = {
- unique_emails: {
- color: "hsl(var(--chart-1))",
- label: "Users",
- },
-} satisfies ChartConfig
-
-function transformData(data: Domain[]): (Domain & { fill: string })[] {
- return data.map((item, index) => ({
- ...item,
- fill: `hsl(var(--chart-${(index % 12) + 1}))`
- }));
-}
-
-export function TopDomainsChart({ data, isLoading, className }: TopDomainsChartProps) {
- if (isLoading) return Loading...
- if (!data.length) return No data available
-
- data = transformData(data)
-
- return (
-
-
-
-
- }
- cursor={{ fill: "hsl(var(--muted))", opacity: 0.2 }}
- />
-
-
-
- )
-}
\ No newline at end of file
+export function Auth0TopDomains(params: {
+ client_id?: string
+ connection_id?: string
+ tenant_name?: string
+ token?: string
+ date_from?: string
+ date_to?: string
+}) {
+ return (
+ {label}
+ )
+ }}
+ categoryConfig={{
+ unique_emails: {
+ label: Unique Users
+ }
+ }}
+ />
+}
\ No newline at end of file
diff --git a/apps/web/src/components/tools/auth0/user-retention-chart.tsx b/apps/web/src/components/tools/auth0/user-retention-chart.tsx
index 419a045..de42f6c 100644
--- a/apps/web/src/components/tools/auth0/user-retention-chart.tsx
+++ b/apps/web/src/components/tools/auth0/user-retention-chart.tsx
@@ -1,107 +1,23 @@
-import {
- Card,
- CardContent,
- CardHeader,
- CardTitle,
-} from "@/components/ui/card"
-import {
- ChartContainer,
- ChartConfig,
- ChartTooltip,
- ChartTooltipContent
-} from "@/components/ui/chart"
-import { Line, LineChart, XAxis, YAxis, CartesianGrid } from "recharts"
-import { format } from "date-fns"
+'use client'
-export interface UserRetentionDataPoint {
- day: string
- user_retention: number
-}
+import { AreaChart } from '@tinybirdco/charts'
-export interface UserRetentionChartData {
- data: UserRetentionDataPoint[]
- timeRange: 'hourly' | 'daily' | 'monthly'
- className?: string
-}
-
-const chartConfig = {
- user_retention: {
- color: "hsl(var(--chart-1))",
- label: "User Retention",
- },
-} satisfies ChartConfig
-
-export function UserRetentionChart({ data, timeRange, className }: UserRetentionChartData) {
- return (
-
-
- User Retention
-
-
-
-
-
- {
- const date = new Date(value)
- return timeRange === 'monthly'
- ? format(date, 'MMM yyyy')
- : value.split('-')[2]
- }}
- label={{
- value: timeRange === 'monthly' ? "Month of Year" : "Day of Month",
- position: "bottom",
- offset: 20
- }}
- />
- `${value}%`}
- label={{
- value: "User Retention",
- angle: -90,
- position: "left",
- offset: 32
- }}
- />
- }
- />
-
-
-
-
-
- )
-}
\ No newline at end of file
+export function Auth0UserRetention(params: {
+ client_id?: string
+ connection_id?: string
+ tenant_name?: string
+ token?: string
+ date_from?: string
+ date_to?: string
+ time_range?: string
+}) {
+ return
+}
\ No newline at end of file
diff --git a/tinybird/pipes/auth0_top_browsers.pipe b/tinybird/pipes/auth0_top_browsers.pipe
index 415c28c..0cb5184 100644
--- a/tinybird/pipes/auth0_top_browsers.pipe
+++ b/tinybird/pipes/auth0_top_browsers.pipe
@@ -25,18 +25,16 @@ SQL >
AND event_time >= {{DateTime(date_from, '2024-01-01 00:00:00')}}
AND event_time <= {{DateTime(date_to, '2025-01-01 23:59:59')}}
AND event.data.user_agent IS NOT NULL
- {% if defined(event_type) %}
- AND event_type = {{String(event_type)}}
- {% end %}
- {% if defined(client_name) %}
+ {% if defined(client_name) and client_name != 'all' %}
AND event.data.client_name::String = {{String(client_name)}}
{% end %}
- {% if defined(connection_id) %}
+ {% if defined(connection_id) and connection_id != 'all' %}
AND event.data.connection_id::String = {{String(connection_id)}}
{% end %}
- {% if defined(tenant_name) %}
+ {% if defined(tenant_name) and tenant_name != 'all' %}
AND event.data.tenant_name::String = {{String(tenant_name)}}
{% end %}
+ AND browser != 'Unknown'
GROUP BY browser
ORDER BY request_count DESC
LIMIT 10
diff --git a/tinybird/pipes/auth0_top_devices.pipe b/tinybird/pipes/auth0_top_devices.pipe
index 8ba2fdc..f3d253c 100644
--- a/tinybird/pipes/auth0_top_devices.pipe
+++ b/tinybird/pipes/auth0_top_devices.pipe
@@ -21,18 +21,16 @@ SQL >
AND event_time >= {{DateTime(date_from, '2024-01-01 00:00:00')}}
AND event_time <= {{DateTime(date_to, '2024-01-01 23:59:59')}}
AND event.data.user_agent IS NOT NULL
- {% if defined(event_type) %}
- AND event_type = {{String(event_type)}}
- {% end %}
- {% if defined(client_name) %}
+ {% if defined(client_name) and client_name != 'all' %}
AND event.data.client_name::String = {{String(client_name)}}
{% end %}
- {% if defined(connection_id) %}
+ {% if defined(connection_id) and connection_id != 'all' %}
AND event.data.connection_id::String = {{String(connection_id)}}
{% end %}
- {% if defined(tenant_name) %}
+ {% if defined(tenant_name) and tenant_name != 'all' %}
AND event.data.tenant_name::String = {{String(tenant_name)}}
{% end %}
+ AND device != 'Bot'
GROUP BY device
ORDER BY request_count DESC
LIMIT 10
diff --git a/tinybird/pipes/auth0_top_domains.pipe b/tinybird/pipes/auth0_top_domains.pipe
index dfff7fc..95c304f 100644
--- a/tinybird/pipes/auth0_top_domains.pipe
+++ b/tinybird/pipes/auth0_top_domains.pipe
@@ -9,26 +9,20 @@ SQL >
splitByChar('@', event.data.user_name::String)[2] as domain
SELECT
domain,
- count(*) as request_count,
- countDistinct(event.data.user_name) as unique_emails,
- min(event_time) as first_seen,
- max(event_time) as last_seen
+ countDistinct(event.data.user_name) as unique_emails
FROM auth0
WHERE 1
AND event.data.user_name::String like '%@%'
AND event_time >= {{DateTime(date_from, '2024-01-01 00:00:00')}}
AND event_time <= {{DateTime(date_to, '2024-01-01 23:59:59')}}
AND event.data.user_name IS NOT NULL
- {% if defined(event_type) %}
- AND event_type = {{String(event_type)}}
+ {% if defined(client_id) and client_id != 'all' %}
+ AND event.data.client_id::String = {{String(client_id)}}
{% end %}
- {% if defined(client_name) %}
- AND event.data.client_name::String = {{String(client_name)}}
- {% end %}
- {% if defined(connection_id) %}
+ {% if defined(connection_id) and connection_id != 'all' %}
AND event.data.connection_id::String = {{String(connection_id)}}
{% end %}
- {% if defined(tenant_name) %}
+ {% if defined(tenant_name) and tenant_name != 'all' %}
AND event.data.tenant_name::String = {{String(tenant_name)}}
{% end %}
GROUP BY domain
diff --git a/tinybird/pipes/auth0_user_retention_ts.pipe b/tinybird/pipes/auth0_user_retention_ts.pipe
index 710b042..4b3baba 100644
--- a/tinybird/pipes/auth0_user_retention_ts.pipe
+++ b/tinybird/pipes/auth0_user_retention_ts.pipe
@@ -14,10 +14,10 @@ SQL >
{% else %}
toStartOfDay(event_time)::Date as day,
{% end %}
- uniqIf(event.data.user_id, event_type = 's' AND event_time >= {{DateTime(date_from, '2024-01-01 00:00:00')}} AND event_time <= {{DateTime(date_to, '2024-12-31 23:59:59')}}) as new_signups,
+ uniqIf(event.data.user_id, event_type = 's' AND event_time >= {{DateTime(date_from, '2024-01-01 00:00:00')}} AND event_time <= {{DateTime(date_to, '2024-12-31 23:59:59')}}) as uniq_logins,
total_users,
ROUND(
- new_signups / total_users * 100, 1
+ uniq_logins / total_users * 100, 1
) as user_retention
FROM auth0
WHERE 1
@@ -30,6 +30,7 @@ SQL >
{% if defined(tenant_name) and tenant_name != 'all' %}
AND event.data.tenant_name::String = {{String(tenant_name)}}
{% end %}
+ AND event_time >= {{DateTime(date_from, '2024-01-01 00:00:00')}} AND event_time <= {{DateTime(date_to, '2024-12-31 23:59:59')}}
GROUP BY day
ORDER BY day