-
Notifications
You must be signed in to change notification settings - Fork 50
Deprecation docs/new functions for abort and isIdentityAvailable #781
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
Merged
ashleysmithTTD
merged 9 commits into
main
from
ans-UID2-deprecation-docs-abort-and-isIdentityAvailable
Dec 16, 2024
Merged
Changes from all commits
Commits
Show all changes
9 commits
Select commit
Hold shift + click to select a range
c535d6e
added isidentityavailable description
ashleysmithTTD 3568dd0
grammar fix
ashleysmithTTD d625fce
moved docs over
ashleysmithTTD 073f149
wording changes
ashleysmithTTD 87f8564
docs changes
ashleysmithTTD 787e080
revert v2 version
ashleysmithTTD 56ba24c
list to bullet points
ashleysmithTTD af2ff52
Merge branch 'main' into ans-UID2-deprecation-docs-abort-and-isIdenti…
genwhittTTD b179d4d
refresh from main + fix links on 2 headings
genwhittTTD File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -15,6 +15,14 @@ export const New = () => ( | |
| <span className='pill'>NEW IN V3</span> | ||
| ); | ||
|
|
||
| export const New3100 = () => ( | ||
| <span className='pill'>New in version 3.10.0</span> | ||
| ); | ||
|
|
||
| export const Deprecated3100 = () => ( | ||
| <span className='pill'>Deprecated in version 3.10.0</span> | ||
| ); | ||
|
|
||
| # SDK for JavaScript Reference Guide | ||
|
|
||
| Use this SDK to facilitate the process of generating or establishing client identity using UID2, retrieving advertising tokens for <Link href="../ref-info/glossary-uid#gl-bidstream">bidstream</Link> use, and automatically refreshing UID2 tokens. | ||
|
|
@@ -261,8 +269,9 @@ All interactions with the SDK for JavaScript are done through the global `__uid2 | |
| - [getAdvertisingToken()](#getadvertisingtoken-string) | ||
| - [getAdvertisingTokenAsync()](#getadvertisingtokenasync-promise) | ||
| - [isLoginRequired()](#isloginrequired-boolean) | ||
| - [isIdentityAvailable()](#isidentityavailable-boolean) <New /> | ||
| - [disconnect()](#disconnect-void) | ||
| - [abort()](#abort-void) | ||
| - [abort()](#abort-void) <Deprecated3100 /> | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Same as above. Link is broken.
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. All good now. Thx. |
||
| - [callbacks](#callbacks) <New /> | ||
| - [setIdentity()](#setidentityidentity-identity-void) <New /> | ||
| - [getIdentity()](#getidentity-identity--null) <New /> | ||
|
|
@@ -422,7 +431,26 @@ Specifies whether a UID2 [POST /token/generate](../endpoints/post-token-gen | |
| | :--- | :--- | | ||
| | `true` | The identity is not available. This value indicates any of the following:<ul><li>The user has opted out.</li><li>The refresh token has expired.</li><li>A first-party cookie is not available and no server-generated identity has been supplied.</li></ul> | | ||
| | `false` | This value indicates one of the following:<ul><li>The identity is present and valid.</li><li>The identity has expired (but the refresh token has not expired), and the token was not refreshed due to an intermittent error. The identity might be restored after a successful auto-refresh attempt.</li></ul> | | ||
| | `undefined` | The SDK initialization is not yet complete. | | ||
|
|
||
| ### isIdentityAvailable(): boolean | ||
|
|
||
| <New3100 /> | ||
|
|
||
| Determines whether an identity is available: for example, if there is an unexpired identity in local storage or in a cookie, or if an identity has already been requested. | ||
|
|
||
| If false, a UID2 [POST /token/generate](../endpoints/post-token-generate.md) call is required. | ||
|
|
||
| ```html | ||
| <script> | ||
| __uid2.isIdentityAvailable(); | ||
| </script> | ||
| ``` | ||
| #### Return Values | ||
|
|
||
| | Value | Description | | ||
| | :--- | :--- | | ||
| | `true` | This value indicates one of the following:<ul><li> The identity is present and valid in a first-party cookie or local storage.</li><li> The identity has expired, and the token was not refreshed due to an intermittent error. The identity might be restored after a successful auto-refresh attempt.</li></ul> | | ||
| | `false` | This value indicates any of the following:<ul><li> The user has opted out.</li><li> The identity is present, but the refresh token has expired.</li><li> The identity has expired, even if the refresh token is still valid.</li><li> A first-party cookie is not available and no server-generated identity has been supplied. </li></ul> | | ||
|
|
||
| ### disconnect(): void | ||
|
|
||
|
|
@@ -443,6 +471,10 @@ If you need to provide a `cookieDomain` or `cookiePath` for the SDK to access th | |
| ::: | ||
|
|
||
| ### abort(): void | ||
|
|
||
| <Deprecated3100 /> | ||
|
|
||
| This function is deprecated and support will be removed completely in June of 2025. Instead, use [disconnect()](#disconnect-void) which has the same functionality as `abort()`, but also includes more thorough disconnection logic. | ||
|
|
||
| Terminates any background timers or requests. The UID2 object remains in an unspecified state and cannot be used anymore. | ||
|
|
||
|
|
||
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is a broken link. Also the other update.
I suggest that you don't mess with the headings but instead maybe, for those two functions, put the "new in" or "deprecated" on the next line, after the heading. For the other functions that have tags, they've been omitted in the body copy. I think it's good info to have with the content, but if you put it in the heading, because it's Markdown, you'd have to update the link.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed with the latest update... all good, thx.