• Home
  • Categories
  • Recent
  • Popular
  • Pricing
  • Contact us
  • Docs
  • Login
FusionAuth
  • Home
  • Categories
  • Recent
  • Popular
  • Pricing
  • Contact us
  • Docs
  • Login
  1. Home
  2. eakpan
  3. Posts
E
  • Profile
  • Following 0
  • Followers 0
  • Topics 1
  • Posts 5
  • Best 1
  • Controversial 0
  • Groups 0

Posts made by eakpan

  • RE: The twoFactorLogin method for the typescript client doesn't return the refreshToken

    Just in case anyone gets stuck here, I had to go to the Admin UI -> Applications -> Security -> Enable refresh.

    It wasn't very clear from the docs as I didn't expect that setting to be there. Would have made more sense if it was under JWT

    posted in General Discussion
    E
    eakpan
    10 Jun 2025, 20:26
  • RE: The twoFactorLogin method for the typescript client doesn't return the refreshToken

    @mark-robustelli Thanks. I'll do just that

    posted in General Discussion
    E
    eakpan
    6 Jun 2025, 18:19
  • RE: The twoFactorLogin method for the typescript client doesn't return the refreshToken

    @mark-robustelli

    I am using the typescript-client-library.

    export const fusionAuthClient: FusionAuthClient = new FusionAuthClient(
      process.env.FUSION_AUTH_API_KEY!,
      process.env.FUSION_AUTH_URL!
    );
    
    posted in General Discussion
    E
    eakpan
    4 Jun 2025, 00:31
  • RE: The twoFactorLogin method for the typescript client doesn't return the refreshToken

    @mark-robustelli

    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
    f57a856f-0c30-4130-bc2b-176844f3f9d2-image.png

    My OAuth settings in my application
    aa7ee5bd-0265-4728-932c-b5cd81cd8dfb-image.png

    posted in General Discussion
    E
    eakpan
    3 Jun 2025, 19:57
  • The twoFactorLogin method for the typescript client doesn't return the refreshToken

    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.

    Steps I have carried out

    • The Application's Oauth setting has Generate refresh tokens enabled
    • The Application's Jwt is enabled with Refresh token duration set
    • The Tenant's Jwt is also enabled

    In the code, I use the twoFactorLogin and I send the twoFactorId, applicationId, code and some eventInfo and iP./

    Result

    • Returns the user
    • Returns the token
    • Does not return the refreshToken
    posted in General Discussion
    E
    eakpan
    3 Jun 2025, 03:46