Skip to content

Commit 2099d32

Browse files
authored
Update user-identity.mdx
Remove frontend id method
1 parent 2508efa commit 2099d32

File tree

1 file changed

+0
-38
lines changed

1 file changed

+0
-38
lines changed

fern/docs/pages/plug-sdk/web/user-identity.mdx

Lines changed: 0 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -120,41 +120,3 @@ const sessionToken = '<SESSION_TOKEN>'
120120
})})();
121121
</script>
122122
```
123-
124-
## Identify users without session token
125-
126-
You can also pass the identifiers in the `plugSDK.init` option without generating the session token.
127-
128-
<Callout intent="note">
129-
This frontend user identification, by its nature, is not secure as the data is transmitted through the client side. It is recommended to use the session token method to securely identify users.
130-
</Callout>
131-
132-
```jsx
133-
window.plugSDK.init({
134-
app_id: '<your_unique_app_id>',
135-
identity: {
136-
user_ref: string;
137-
user_traits?: { // optional
138-
custom_fields?: object; // optional
139-
display_name?: string; // optional
140-
email?: string; // optional
141-
phone_numbers?: string[]; // optional
142-
}
143-
}
144-
})
145-
```
146-
147-
You can add or update the data in `user_traits` by using the `updateIdentity` method on the PLuG SDK. Attached is a sample code snippet for the same.
148-
149-
```jsx
150-
window.plugSDK.updateIdentity({
151-
user_traits: {
152-
custom_fields?: object; // optional
153-
display_name?: string; // optional
154-
email?: string; // optional
155-
phone_numbers?: string[]; // optional
156-
}
157-
})
158-
```
159-
160-

0 commit comments

Comments
 (0)