Skip to content

Commit dd1166d

Browse files
committed
wip: authContext
1 parent 37eac69 commit dd1166d

File tree

1 file changed

+5
-10
lines changed

1 file changed

+5
-10
lines changed

packages/auth/src/lib/AuthManager/getAuthContext.ts

Lines changed: 5 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,7 @@ export interface AuthenticationContext {
1616
}
1717

1818
export interface GetAuthContextParams {
19-
authContextType: 'eoa' | 'pkp' | 'lit-action';
20-
pkpPublicKey: `0x${string}`;
19+
authMethodType: AUTH_METHOD_TYPE_TYPE;
2120
pkpAddress: `0x${string}`;
2221
litNodeClient: LitNodeClient;
2322
signer: {
@@ -29,22 +28,18 @@ export interface GetAuthContextParams {
2928
export const getAuthContext = (
3029
params: GetAuthContextParams
3130
): AuthenticationContext => {
32-
switch (params.authContextType) {
33-
case 'eoa':
31+
switch (params.authMethodType) {
32+
case 'EthWallet':
3433
return getEoaAuthContext({
3534
litNodeClient: params.litNodeClient,
3635
identity: {
37-
pkpPublicKey: params.pkpPublicKey,
36+
pkpPublicKey: params.pkpAddress,
3837
signer: params.signer,
3938
signerAddress: params.pkpAddress,
4039
},
4140
});
42-
// case 'pkp':
43-
// case 'lit-action':
4441
default:
45-
throw new Error(
46-
`Unsupported auth method type: ${params.authContextType}`
47-
);
42+
throw new Error(`Unsupported auth method type: ${params.authMethodType}`);
4843
}
4944
};
5045

0 commit comments

Comments
 (0)