You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* RID-8543: expose getSessionToken
* RID-8543: Update package version, update readme, write about the changes in changelog
* RID-8543: Update upload-artifiact to v4, cause v3 is deprecated
* RID-8543: Update vite to fix vulnerable package
* RID-8543: Bump vite even higher, to fix all vulnerabilities
* RID-8543: Bump node version in pipeline
* RID-8543: Remove redundant spacebars
* RID-8543: Switch invocation of getSessionToken to use ref
Copy file name to clipboardExpand all lines: package/README.md
+8-2Lines changed: 8 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -37,19 +37,21 @@ import { TSAccountProtectionProvider } from '@transmitsecurity/riskid-reactjs-ts
37
37
38
38
## Step 4: Use the React library
39
39
40
-
The example below demonstrates triggering a login event from a login button, setting and clearing a user.
40
+
The example below demonstrates triggering a login event from a login button, setting and clearing a user and obtaining a session token.
41
41
42
42
-`triggerActionEvent()` receives an action type and returns a response that includes the `actionToken`. To obtain risk recommendations for sensitive actions, your application should report these actions. To do this, add the code below to relevant user interactions (such as the Login button `click` event handler). The library allows reporting on events with the following action types: `login`, `register`, `transaction`, `password_reset`, `logout`, `checkout`, `account_details_change`, `account_auth_change`, `withdraw` or `credits_change`.
43
43
44
44
-`setAuthenticatedUser()` sets the user context for all subsequent events in the browser session (or until the user is explicitly cleared). It should be set only after you've fully authenticated the user (including, for example, any 2FA that was required). Receives an opaque identifier of the user in your system ([USER_ID] in the snippet), which shouldn't contain any personal info.
45
45
46
46
-`clearUser()` clears the user context for all subsequent events in the browser session.
47
+
48
+
-`getSessionToken()` retrieves the current device session token as a string, that can be used to trigger action events via backend API.
0 commit comments