hotfix: generateTokenWithOtp request change
This commit is contained in:
@@ -35,7 +35,8 @@ export const generateTokenWithPassword = (
|
||||
};
|
||||
|
||||
export interface GenerateTokenWithOTP {
|
||||
username: string;
|
||||
email?: string;
|
||||
phonenumber?: string;
|
||||
otp: string;
|
||||
}
|
||||
|
||||
@@ -44,8 +45,9 @@ export const generateTokenWithOtp = (request: GenerateTokenWithOTP) => {
|
||||
body.set('grant_type', 'otp');
|
||||
body.set('client_id', import.meta.env.VITE_IDENTITY_CLIENT_ID);
|
||||
body.set('scope', import.meta.env.VITE_IDENTITY_SCOPE);
|
||||
body.set('username', request.username);
|
||||
body.set('otp', request.otp);
|
||||
if (request.email) body.set('email', request.email);
|
||||
if (request.phonenumber) body.set('phonenumber', request.phonenumber);
|
||||
body.set('otp_code', request.otp);
|
||||
|
||||
return apiClient.post<GenerateTokenResponse>(
|
||||
import.meta.env.VITE_IDENTITY_URL,
|
||||
|
||||
Reference in New Issue
Block a user