replace whitelistUrl function with inline implementation
#1044
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.
whitelistUrlimport from@web3auth/authwhitelistUrlfunction inline in the example@toruslabs/eccrypto,@toruslabs/metadata-helpers, andbase64urlbase64urlimport to usebase64urlLibexplicitlyasyncIIFE for better execution handlingThis update ensures that developers can manually whitelist origins without relying on deprecated functions from
@web3auth/auth.Motivation and Context
The
whitelistUrlfunction was originally part of the@toruslabs/openloginpackage but was removed when the package was restructured and renamed to@web3auth/auth. As a result, developers no longer had a built-in way to generate origin whitelisting signatures. This update provides an inline implementation ofwhitelistUrl, ensuring that developers can still perform secure manual whitelisting without relying on outdated package versions.Jira Link: DEVREL-1154
Description
whitelistUrlfunction with an inline implementation in the documentation example.@toruslabs/eccrypto,@toruslabs/metadata-helpers, andbase64url).base64urlimport to usebase64urlLib, aligning with existing utilities.asyncImmediately Invoked Function Expression (IIFE) for proper execution.How has this been tested?
whitelistUrlfunction generates valid signatures matching the expected format.@toruslabs/eccryptoand@toruslabs/metadata-helpersfor cryptographic operations.AuthAdapterand ensuring correct behavior in a secure execution environment.Types of changes
Checklist: