ACTION REQUIRED BY AUGUST 27, 2024 - UPDATE TO LATEST OR DISABLE COOKIE VALIDATION
🚨 BREAKING ROBLOX API CHANGE | MANDATORY UPDATE:
getCurrentUser()
calls https://www.roblox.com/mobileapi/userinfo which is being deprecated August 27, 2024. This method is used by setCookie()
to validate the cookie - following this change, getAuthenticatedUser()
will be used instead which has a different return schema.
Failure to take action by August 27th, 2024 will cause a runtime error and your cookie fail report as invalid / return no user object.
See https://devforum.roblox.com/t/official-list-of-deprecated-web-endpoints/62889/66
⚠ Action Steps:
- Update
noblox.js
to v6.0.1 (recommended) or disable cookie validation fromsetCookie
viasetCookie(ROBLOX_COOKIE, false)
- Replace references to
getCurrentUser()
or objects saved fromsetCookie
withgetAuthenticatedUser()
,getUserFunds()
,getPlayerThumbnail()
orgetPremium()
Disabling Deprecation Warnings
As part of this release, deprecation messages have been added to notify users of changes to the getCurrentUser()
method. These messages will appear both as console output and within the method's return value to indicate that the method is deprecated.
If you wish to suppress these warnings in your console, you can opt out by setting the following option:
noblox.setOptions({ show_deprecation_warnings: false });
See #824 for more information.
setCookie
modified return value
BEFORE:
// @see https://noblox.js.org/global.html#LoggedInUserData
{
"UserID": 2416399685, // use getAuthenticatedUser() instead
"UserName": "nobIoxjs", // use getAuthenticatedUser() instead
"RobuxBalance": 0, // use getUserFunds() instead
"ThumbnailUrl": "https://tr.rbxcdn.com/30DAY-Avatar-ED50D6AA9232B1E4A3DEC2F4AACC8FA9-Png/352/352/Avatar/Webp/noFilter", // use getPlayerThumbnail() instead
"IsAnyBuildersClubMember": false, // always returns false
"IsPremium": false // use getPremium instead
}
AFTER:
// @see https://noblox.js.org/global.html#AuthenticatedUserData
{
"id": 2416399685,
"name": "nobIoxjs",
"displayName": "nobIoxjs"
}
--
NOTE:
getCurrentUser()
is now deprecated and has been polyfilled to return the same response after August 27, 2024
Calls to getCurrentUser()
will now consume 4 API calls which is inherently slower and has a greater performance impact - we strongly recommend migrating to the subcalls that are applicable to your usecase:
🥳 New Features
getUserFunds()
has been added as a new method by @alanbixby in #824; it will report the authenticated user's robux balance
🏠 Unused dependencies have been removed from the package and replaced with modern equivalents.
- Dependency Cleanup: Removed old
signalr-client
andprogress
dependencies in #823 - Linting: The project now uses
standard
directly for linting in #823
Authors
- Alan Bixby (@alanbixby)
- Josh (@Neztore
Full Changelog: v5.0.0...v6.0.1