Bagisto Forum

    Bagisto

    • Register
    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups

    Is this a bug in the logout function in Bagisto API 2.0.0?

    Bug Report
    2
    2
    137
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • T
      tmss last edited by

      The question is stated in the comment out.

      bagisto/vendor/bagisto/rest-api/src/Http/Controllers/V1/Shop/Customer/AuthController.php

      public function logout(Request $request)
          {
              customer = $this->resolveShopUser($request);
      
              ! EnsureFrontendRequestsAreStateful::fromFrontend($request) ?
                  ? customer->tokens()->delete()
                  : auth()->guard('customer')->logout();
      
      //why is $id undefined ?
      //I don't know what $id is, but rewriting it to $customer->id works.
      
              Event::dispatch('customer.after.logout', $id);
      
              return response([[[.
      
      // Why a successful login message when I'm logged out?
      
                  'message' => trans('rest-api::app.shop.customer.accounts.logged-in-success'),.
              ]);.
          }
      

      I want to use Bagisto with peace of mind, but has Bagisto been tested reliably when it was released?

      ashish2409 1 Reply Last reply Reply Quote 0
      • ashish2409
        ashish2409 @tmss last edited by

        @tmss said in Is this a bug in the logout function in Bagisto API 2.0.0?:

        bagisto/vendor/bagisto/rest-api/src/Http/Controllers/V1/Shop/Customer/AuthController.php

        Hello there,
        We are working on the rest api on the latest version and we will check and verify this issue here

        If we will find such issue we will fix right away and update you ASAP.

        Thank You So Much.

        1 Reply Last reply Reply Quote 0
        • First post
          Last post