Giter VIP home page Giter VIP logo

Comments (6)

robotdan avatar robotdan commented on July 20, 2024

I think there are two issues here:

  1. It looks like there may be a regression issue with this method, previously it was using the API key (if provided on the client constructor). This API can be called with or without an API key and now it is calling w/out it. This may be causing you problems if your API key is locked to a tenant.
  2. You are seeing an error indicating you need to provide the Tenant Id

Regarding the second issue, how many tenants do you have configured? Was this the same number when you were running 1.11.0? Is your API key locked to a single tenant?

from fusionauth-php-client.

robotdan avatar robotdan commented on July 20, 2024

@matthew-altman looks like a regression issue. This will affect all client libraries.

The forgotPassword method is being called w/out an API key, previously it was using the API key if we had it. The API can be called in both ways, so we'll need to either add a new method that uses the API key, or somehow instruct this method to be called in either mode.

We could just use the start instead of startAnonymous since if there is an API key available it doesn't hurt. We should probably do an audit of all of the APIs now using the startAnonymous method in the client builder to ensure they cannot be optionally be called with an API key.

from fusionauth-php-client.

robotdan avatar robotdan commented on July 20, 2024

A work around if you want to use the API key.

In FusionAuthClient.php change

  public function forgotPassword($request)
  {
    return $this->startAnonymous()->uri("/api/user/forgot-password")
        ->bodyHandler(new JSONBodyHandler($request))
        ->post()
        ->go();
  }

to

  public function forgotPassword($request)
  {
    return $this->start()->uri("/api/user/forgot-password")
        ->bodyHandler(new JSONBodyHandler($request))
        ->post()
        ->go();
  }

from fusionauth-php-client.

kgogolek avatar kgogolek commented on July 20, 2024

Thanks for the reply @robotdan .
Yes I can confirm we're using the API key for all the calls. Is there a better way going forward?
We have about 5-6 tenants set up, and it was the same number before we upgraded the libs.
For now we've reverted to 1.11 but might implement the work-around if we need to upgrade the versions.

from fusionauth-php-client.

robotdan avatar robotdan commented on July 20, 2024

Ok, good to know. You could upgrade FusionAuth and keep with the older php client as well, or patch your client as outlined above.

We'll be patching the client shortly, stay tuned.

from fusionauth-php-client.

robotdan avatar robotdan commented on July 20, 2024

1.12.1 is available which contains the corrected behavior. Thanks for letting us know!
https://packagist.org/packages/fusionauth/fusionauth-client

from fusionauth-php-client.

Related Issues (17)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.