[Bug] Fix False Positive Custom Auth Tests#881
Merged
Ansonhkg merged 5 commits intonaga_add_hardcoded_keysets-3from Sep 15, 2025
Merged
[Bug] Fix False Positive Custom Auth Tests#881Ansonhkg merged 5 commits intonaga_add_hardcoded_keysets-3from
Ansonhkg merged 5 commits intonaga_add_hardcoded_keysets-3from
Conversation
- add missing `maxPrice` in the custom auth payload - e2e: fix custom auths
…alice-auth-manager-data`
Ansonhkg
commented
Sep 5, 2025
| litActionCode: requestBody.litActionCode, | ||
| litActionIpfsId: requestBody.litActionIpfsId, | ||
| jsParams: requestBody.jsParams, | ||
| maxPrice: getUserMaxPrice({ |
Contributor
Author
There was a problem hiding this comment.
This was missing in the payload
Ansonhkg
commented
Sep 5, 2025
Ansonhkg
commented
Sep 5, 2025
e2e/src/tickets/custom-auth.spec.ts
Outdated
Comment on lines
41
to
63
| // (async () => { | ||
| // const dAppUniqueAuthMethodType = "0x20b2c2163698c4ba8166450ff2378d96c009016deba048b9b125a696c74ea4b5"; | ||
| // const { pkpPublicKey, username, password, authMethodId } = jsParams; | ||
|
|
||
| // // Custom validation logic for amazing-app-x35ju8 | ||
| // const EXPECTED_USERNAME = 'alice'; | ||
| // const EXPECTED_PASSWORD = 'lit'; | ||
| // const userIsValid = username === EXPECTED_USERNAME && password === EXPECTED_PASSWORD; | ||
|
|
||
| // // Check PKP permissions | ||
| // const tokenId = await Lit.Actions.pubkeyToTokenId({ publicKey: pkpPublicKey }); | ||
| // const permittedAuthMethods = await Lit.Actions.getPermittedAuthMethods({ tokenId }); | ||
|
|
||
| // const isPermitted = permittedAuthMethods.some((permittedAuthMethod) => { | ||
| // return permittedAuthMethod["auth_method_type"] === dAppUniqueAuthMethodType && | ||
| // permittedAuthMethod["id"] === authMethodId; | ||
| // }); | ||
|
|
||
| // const isValid = isPermitted && userIsValid; | ||
| // LitActions.setResponse({ response: isValid ? "true" : "false" }); | ||
| // })(); | ||
| // ============================================================ | ||
| const validationIpfsCid = 'QmP3ZoTSGQ2P9cAZ4pBUjmPC34xbJZFRoWnCXT2SdHA2uD'; |
packages/networks/src/networks/vNaga/shared/factories/BaseModuleFactory.ts
Show resolved
Hide resolved
This was referenced Sep 15, 2025
glitch003
approved these changes
Sep 15, 2025
Collaborator
glitch003
left a comment
There was a problem hiding this comment.
seems good as long as questions are addressed
Ansonhkg
added a commit
that referenced
this pull request
Sep 15, 2025
Closed
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.

WHAT
Custom auth E2E tests were producing false-positive results. It was working because it was using the cached Alice's delegation auth sig instead of using a fresh PKP.
CHANGES
TEST
This PR depends on the hardcoded keysets fixes here
bun test e2e/src/tickets/custom-auth.spec.ts --timeout 500000