@opentdf/sdk
    Preparing search index...

    Function refreshTokenProvider

    • Creates a TokenProvider that uses a refresh token to obtain access tokens. On the first call, exchanges the refresh token. Subsequent calls use the latest refresh token from the IdP response.

      Parameters

      Returns TokenProvider

      const client = new OpenTDF({
      interceptors: [authTokenInterceptor(refreshTokenProvider({
      clientId: 'my-app',
      refreshToken: 'refresh-token-from-login',
      oidcOrigin: 'http://localhost:8080/auth/realms/opentdf',
      }))],
      platformUrl: 'http://localhost:8080',
      });