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

    mariahcarey1092

    @mariahcarey1092

    0
    Reputation
    1
    Profile views
    1
    Posts
    0
    Followers
    0
    Following
    Joined Last Online

    mariahcarey1092 Unfollow Follow

    Latest posts made by mariahcarey1092

    • RE: Issue with exchangeOAuthCodeForAccessToken Returning Scope Error in @fusionauth/typescript-client 1.54.0

      It looks like you're encountering an issue with the @fusionauth fnaf/typescript-client library after upgrading to version 1.54.0. The error message indicates that the access token you're receiving does not include the openid scope, which is necessary for the retrieveUserInfoFromAccessToken function to work properly.
      import { FusionAuthClient } from '@fusionauth/typescript-client';

      const client = new FusionAuthClient(apiKey, fusionAuthUrl);

      async function authenticateUser() {
      const response = await client.exchangeOAuthCodeForAccessToken(clientId, clientSecret, redirectUri, code);

      if (response.successResponse) {
          const accessToken = response.successResponse.access_token;
          const userInfo = await client.retrieveUserInfoFromAccessToken(accessToken);
          console.log(userInfo);
      } else {
          console.error(response.errorResponse);
      }
      

      }

      posted in Q&A
      M
      mariahcarey1092