-
Couldn't load subscription status.
- Fork 87
[Bug] Fix False Positive Custom Auth Tests #881
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
[Bug] Fix False Positive Custom Auth Tests #881
Conversation
- add missing `maxPrice` in the custom auth payload - e2e: fix custom auths
…alice-auth-manager-data`
| litActionCode: requestBody.litActionCode, | ||
| litActionIpfsId: requestBody.litActionIpfsId, | ||
| jsParams: requestBody.jsParams, | ||
| maxPrice: getUserMaxPrice({ |
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 was missing in the payload
e2e/src/tickets/custom-auth.spec.ts
Outdated
| // (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'; |
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.
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.
updated
packages/networks/src/networks/vNaga/shared/factories/BaseModuleFactory.ts
Show resolved
Hide resolved
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.
seems good as long as questions are addressed

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