Skip to content

AUT Feature #404

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 115 commits into
base: main
Choose a base branch
from
Open

AUT Feature #404

wants to merge 115 commits into from

Conversation

hardikmashru
Copy link
Contributor

@hardikmashru hardikmashru commented Jun 7, 2024

JIRA Ticket(s) if any

Description

Test Steps

hani-iterable and others added 24 commits March 4, 2024 09:07
* merge fork repo code and implement anon session

* resolve test cases failure

* call API for getting criteria

* track anon event and purchase

* track anon update cart and user

* write test cases

* resolve test cases failure for autjorization

* modify anonymous manager class

* modify test cases

* update the lock files

* implement criteria completion checker

* implement user merge and set config

* set config

* Complete AUT feature

* Resolve review comments

* implement test case for merge user

* unit test case for anon user event tracking

* test case for criteria completion checker

* resolve build failure

* resolve build failure

* resolve review comments

* remove circular dependency

* remove lock file

* resolve review comments
@hardikmashru hardikmashru requested a review from mprew97 as a code owner June 7, 2024 14:13
@mprew97
Copy link
Contributor

mprew97 commented Jun 10, 2024

@hardikmashru what's the difference between this and the AUT branch? Are there new additions? Hard to tell what to review.

Also, the build appears to be failing so we ought to address that.

@hardikmashru
Copy link
Contributor Author

@hardikmashru what's the difference between this and the AUT branch? Are there new additions? Hard to tell what to review.

Also, the build appears to be failing so we ought to address that.

Hi @mprew97 Please do not review other branch AUT, please review this one only.

Copy link
Contributor

@mprew97 mprew97 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we need to base this off of our Embedded GA work because there are quite a lot of architectural shifts and features that this branch should be making use of.

For example, the updates to network interceptors, the ability in the sample app to toggle between userId and email, and many others.

mprew97 and others added 9 commits October 16, 2024 09:35
* fix replay issue with JWT

* fix spec
…alls (#467)

* fix replay issue with JWT

* fix spec

* move initialize check over

* add type of auth util

* clean up auth checks and circular deps

* add getter

* fix

* lets see

* add additional endpoints
…468)

* prettify code

* [MOB-9703] Added support for fetching new JWT prior to calling merge

* moved JWT to localstorage

* fix circular deps
* [MOB-9970] anonymous criteria should match for nested values

* [MOB-10064] single primitive array bug fix
* update var, some error cleanup in sample app

* remove endpoint from list

* fix spec
* clear anon data on user initialization

* clear anon data even if replay is false

* update tests

* oop

* Update authorization.ts
return this.callMergeApi(mergeApiParams);
}

private callMergeApi(data: MergeApiParams): Promise<void> {
Copy link

@akshitkrnagpal akshitkrnagpal Jan 21, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi

We are getting Merging known user profiles is forbidden with this api key type error for this. We are using Web (Client-side - JWT required) api key and I assume others are doing the same.

What is the recommended approach here?

I don't think using server side api key for client side sdk is safe and yes, merging users indeed should be server side feature. Otherwise, any user can merge any 2 user profiles.

I guess a safe solution would be to create another api that only allows merging anonymous user ids into a user profile (for which the JWT was generated). Not sure how it would work without JWT.

darshan-iterable and others added 6 commits July 17, 2025 09:50
* prettify code

* [MOB-9703] Added support for fetching new JWT prior to calling merge

* [MOB-9999] Aggregate user update event gets deleted

* missed this

* fix up tests and issues

* update types

* update types some more

* forgot to commit this

---------

Co-authored-by: mitch prewitt <[email protected]>
* prettify code

* [MOB-9703] Added support for fetching new JWT prior to calling merge

* [MOB-9999] Aggregate user update event gets deleted

* missed this

* fix up tests and issues

* update types

* update types some more

* forgot to commit this

* update and cleanup UUA tests

---------

Co-authored-by: Darshan Parmar <[email protected]>
* rename anonymous -> unknown

* accidentally got deleted

* Update authorization.ts
* consent loggimg impl draft

* remove consent check and cleanup some

* test fixes and additional cleanup

* rework a bit

* fix specs
* bump version (#482)

* [MOB-11001] adding codecov to web-sdk (#487)

* [MOB-11346] exposing baseIterableRequest (#489)

* [MOB-11346] exposing baseIterableRequest

* Update README.md

Co-authored-by: lauren-mulkern <[email protected]>

* Update README.md

Co-authored-by: lauren-mulkern <[email protected]>

* [MOB-11346] adding example for readme

---------

Co-authored-by: lauren-mulkern <[email protected]>

* [MOB-11441] Bump axios dependency version (#494)

* [MOB-11441] Bump axios version

* [MOB-11441] Bump axios version in react app

* [MOB-11449] Upgrade jest dependency (#496)

* [MOB-11449] Upgrade jest dependency in react sample app

* [MOB-11449] Upgrade jest dependency in sample app

* [MOB-11449] Upgrade jest dependency req

* [MOB-11443] Bump express dependency version (#495)

* [MOB-11443] Bump express dependency version

* [MOB-11443] Bump express dependency version in sample app

* [MOB-11443] Bump express dependency version in react sample app

* [MOB-11443] Remove expess from package.json

* [MOB-11427] Add maxWidth to getInAppMessages payload (#491)

* [MOB-11427] Add maxWidth to getinappmessages payload

* [MOB-11427] Include ESLint as workspace formatter

* Revert "[MOB-11427] Include ESLint as workspace formatter"

This reverts commit 63639ea.

* [MOB-11427] Update tests and refactor

* [MOB-11427] Add test

* [MOB-11427] Update README

* [MOB-11439] Upgrade Web SDK version to v1.2.0 (#499)

* [MOB-11487] Upgrade webpack dependency (#500)

* [MOB-11503] Fix eslint errors on vanilla JS sample app (#501)

* [MOB-11503] Fix lint formatting errors on axios post request params

* [MOB-11503] Cleanup

* [MOB-11503] Reorder imports

* [MOB-11503] Support login email in env

* [MOB-11524] Support non-JWT requests in react sample app (#505)

* [MOB-11524] Add USE_JWT to env example

* [MOB-11524] Add lint exception for sample app

* [MOB-11524] Support non-JWT requests in react sample app

* [MOB-11524] Fix init

* [MOB-11524] Use await

* [MOB-11524] Set auth token for non-jwt logins after a logout

* [MOB-11524] Set auth token for non-jwt logins after a logout

* [MOB-11524] Create helper fn

* [MOB-11524] Undo autoformat

* [MOB-11524] Resolve linter error

* [MOB-11507] Upgrade webpack-dev-server and node (#502)

* [MOB-11507] Upgrade webpack-dev-server

* [MOB-11507] Upgrade webpack-dev-server in /react-example

* [MOB-11507] Upgrade webpack-dev-server in /example

* [MOB-11507] Update env comments

* [MOB-11507] Update node engine requirement

* [MOB-11507] Upgrade webpack-cli

* [MOB-11507] Upgrade webpack-cli in /example

* [MOB-11507] Remove iterable from dependencies in /react-example

* [MOB-11507] Upgrade webpack-cli in /react-example

* [MOB-11507] Update node in ci config

* [MOB-11507] Update lint config

* [MOB-11507] Update README

* [MOB-11616] Resolve Remaining Vulnerable Security Dependencies (#508)

* [MOB-11616] Resolve braces vulnerability

* [MOB-11616] Resolve micromatch vulnerability

* [MOB-11616] Resolve babel runtime vulnerability

* [MOB-11554] Resolve lint warnings (#506)

* [MOB-11554] Resolve lint warnings in Users

* [MOB-11554] Resolve lint warnings in Commerce

* [MOB-11554] Resolve lint warnings in EventsForm

* [MOB-11554] Resolve lint warnings in EmbeddedMsgsImpressionTracker

* [MOB-11554] Resolve lint warnings in EmbeddedMsgs

* [MOB-11554] Resolve lint warnings in EmbeddedForm

* [MOB-11554] Clean up lint disables

* [MOB-11618] Dedupe lockfiles (#509)

* [MOB-11618] Dedupe lockfiles

* [MOB-11618] Reinstall

* [MOB-11575] Bump version to v2.0.0 (#510)

* [MOB-11701] Test Publish (#514)

* [MOB-11702] Add .nvmrc config to project (#513)

* [MOB-11702] Add .nvmrc config to project

* [MOB-11702] Add newline

* [MOB-11702] Remove comments

* [MOB-11716] Add build steps to publish workflow (#517)

* [MOB-11717] Update version to v2.1.0 (#518)

* fix UUA and base functionality

* fix linting errors

* fix up tests

* update tests (WIP)

* add new test suite to cover UUA logic on auth

---------

Co-authored-by: Geoff Kim <[email protected]>
Co-authored-by: lauren-mulkern <[email protected]>
Co-authored-by: Paul Jung <[email protected]>
@codecov-commenter
Copy link

codecov-commenter commented Aug 11, 2025

Codecov Report

❌ Patch coverage is 91.46789% with 93 lines in your changes missing coverage. Please review.
✅ Project coverage is 74.35%. Comparing base (d24a4df) to head (499324c).

Files with missing lines Patch % Lines
...c/unknownUserTracking/criteriaCompletionChecker.ts 92.55% 25 Missing and 1 partial ⚠️
src/authorization/authorization.ts 92.28% 24 Missing ⚠️
src/unknownUserTracking/unknownUserEventManager.ts 90.09% 22 Missing ⚠️
src/unknownUserTracking/unknownUserMerge.ts 63.15% 7 Missing ⚠️
src/commerce/commerce.ts 45.45% 6 Missing ⚠️
src/unknownUserTracking/tests/testHelpers.ts 85.71% 6 Missing ⚠️
src/index.ts 0.00% 1 Missing ⚠️
src/utils/authorizationToken.ts 92.85% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #404      +/-   ##
==========================================
+ Coverage   65.01%   74.35%   +9.34%     
==========================================
  Files          47       57      +10     
  Lines        1795     2734     +939     
  Branches      553      816     +263     
==========================================
+ Hits         1167     2033     +866     
- Misses        627      660      +33     
- Partials        1       41      +40     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

mprew97 and others added 3 commits August 14, 2025 13:25
* export and readme updates

* remove comments

* more updates

* fix specs

* prettier fix
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants