-
Notifications
You must be signed in to change notification settings - Fork 267
Open
Description
This type is used for the args of the signinResourceOwnerCredentials method.
oidc-client-ts/src/OidcClient.ts
Lines 60 to 65 in c776557
| export type ProcessResourceOwnerPasswordCredentialsArgs = { | |
| username: string; | |
| password: string; | |
| skipUserInfo?: boolean; | |
| extraTokenParams?: Record<string, unknown>; | |
| }; |
Suggesting a usecase like so
auth.signinResourceOwnerCredentials({
username: formData.get('username') as string,
password: formData.get('password') as string,
skipUserInfo: false,
extraTokenParams: {
otp: formData.get('otp') as string,
},
});Though the actual method doesn't accept extraTokenParams
oidc-client-ts/src/UserManager.ts
Lines 224 to 229 in c776557
| public async signinResourceOwnerCredentials({ | |
| username, | |
| password, | |
| skipUserInfo = false, | |
| }: SigninResourceOwnerCredentialsArgs): Promise<User> { | |
| const logger = this._logger.create("signinResourceOwnerCredential"); |
It passes this.settings.extraTokenParams directly
oidc-client-ts/src/UserManager.ts
Lines 234 to 236 in c776557
| skipUserInfo, | |
| extraTokenParams: this.settings.extraTokenParams, | |
| }); |
I feel like if the usecase suggested by the types is in the intended use case then this needs to accept and pass the extraTokenParams here and not just the values in this.settings.extraTokenParams.
Use case is keycloak password grant with OTP.
Metadata
Metadata
Assignees
Labels
No labels