I am using the typescript-client-library
.
export const fusionAuthClient: FusionAuthClient = new FusionAuthClient(
process.env.FUSION_AUTH_API_KEY!,
process.env.FUSION_AUTH_URL!
);
I am using the typescript-client-library
.
export const fusionAuthClient: FusionAuthClient = new FusionAuthClient(
process.env.FUSION_AUTH_API_KEY!,
process.env.FUSION_AUTH_URL!
);
Here's how I use it in the code
const response = await this.fusionAuthClient.twoFactorLogin({
applicationId,
code,
twoFactorId,
ipAddress,
metaData: {
device: {
name: deviceName,
type: deviceType,
},
},
eventInfo: {
deviceName,
deviceType,
data: {
deviceId,
},
},
});
if (!response.wasSuccessful()) {
logger.error(
{ twoFactorId, deviceData, ipAddress },
`Failed to verify the MFA, ${response.exception.message}`
);
return { type: 'failure', error: new VerifyMfaFailed() };
}
logger.info(
{ response: response.response },
`The response from the two factor login`
);
The response.response
does not contain refreshToken
at all from the logs
My application setup to show support for jwt and refresh
My OAuth settings in my application
I setup my users to use MFA
and have that working successfully but when they put in the code from the Authenticator
app, they only get an access-token
. The refresh-token
is undefined.
Application
's Oauth setting has Generate refresh tokens
enabledApplication
's Jwt is enabled with Refresh token
duration setTenant
's Jwt is also enabledIn the code, I use the twoFactorLogin
and I send the twoFactorId
, applicationId
, code
and some eventInfo
and iP
./
user
token
refreshToken