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

    eakpan

    @eakpan

    0
    Reputation
    2
    Profile views
    3
    Posts
    0
    Followers
    0
    Following
    Joined Last Online

    eakpan Unfollow Follow

    Latest posts made by eakpan

    • 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
    • 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
    • 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