Skip to content

Commit

Permalink
feat(integrations/auth0): include Auth0 event type in Rudderstack mes…
Browse files Browse the repository at this point in the history
…sage (#3370)

Co-authored-by: Gauravudia <[email protected]>
  • Loading branch information
zenpaul and Gauravudia authored May 20, 2024
1 parent a06ddce commit e9409fd
Show file tree
Hide file tree
Showing 2 changed files with 37 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/v0/sources/auth0/mapping.json
Original file line number Diff line number Diff line change
Expand Up @@ -62,5 +62,9 @@
{
"sourceKeys": "date",
"destKeys": ["originalTimestamp", "sentAt"]
},
{
"sourceKeys": "type",
"destKeys": "source_type"
}
]
33 changes: 33 additions & 0 deletions test/integrations/sources/auth0/data.ts
Original file line number Diff line number Diff line change
Expand Up @@ -254,6 +254,7 @@ export const data = [
batch: [
{
type: 'identify',
source_type: 'ss',
sentAt: '2022-10-31T05:57:06.859Z',
traits: {
connection: 'Username-Password-Authentication',
Expand Down Expand Up @@ -304,6 +305,7 @@ export const data = [
batch: [
{
type: 'track',
source_type: 'sapi',
event: 'Success API Operation',
sentAt: '2022-10-31T05:57:06.874Z',
userId: 'auth0|dummyPassword',
Expand Down Expand Up @@ -594,6 +596,7 @@ export const data = [
batch: [
{
type: 'group',
source_type: 'sapi',
sentAt: '2022-10-31T06:09:59.135Z',
userId: 'google-oauth2|123456',
anonymousId: '97fcd7b2-cc24-47d7-b776-057b7b199513',
Expand Down Expand Up @@ -936,6 +939,7 @@ export const data = [
batch: [
{
type: 'track',
source_type: 'sapi',
event: 'Success API Operation',
sentAt: '2022-10-31T06:15:25.201Z',
userId: 'google-oauth2|123456',
Expand Down Expand Up @@ -1157,6 +1161,7 @@ export const data = [
batch: [
{
type: 'track',
source_type: 'gd_tenant_update',
event: 'Guardian tenant update',
sentAt: '2022-10-31T06:15:25.196Z',
userId: 'google-oauth2|123456',
Expand Down Expand Up @@ -1285,6 +1290,7 @@ export const data = [
batch: [
{
type: 'identify',
source_type: 'ss',
sentAt: '2022-10-31T05:57:06.859Z',
traits: {
connection: 'Username-Password-Authentication',
Expand Down Expand Up @@ -1404,6 +1410,7 @@ export const data = [
batch: [
{
type: 'identify',
source_type: 'ss',
userId: '',
anonymousId: '97fcd7b2-cc24-47d7-b776-057b7b199513',
sentAt: '2022-10-31T05:57:06.859Z',
Expand Down Expand Up @@ -1454,6 +1461,7 @@ export const data = [
batch: [
{
type: 'track',
source_type: 'sapi',
event: 'Success API Operation',
sentAt: '2022-10-31T05:57:06.874Z',
anonymousId: '97fcd7b2-cc24-47d7-b776-057b7b199513',
Expand Down Expand Up @@ -1490,4 +1498,29 @@ export const data = [
defaultMockFns();
},
},
{
name: 'auth0',
description: 'empty batch',
module: 'source',
version: 'v0',
input: {
request: {
body: [],
method: 'POST',
headers: {
'Content-Type': 'application/json',
},
},
pathSuffix: '',
},
output: {
response: {
status: 200,
body: [],
},
},
mockFns: () => {
defaultMockFns();
},
},
];

0 comments on commit e9409fd

Please sign in to comment.