laravel-paystack icon indicating copy to clipboard operation
laravel-paystack copied to clipboard

Laravel Inertia Vue3 Cors error

Open eokwukwe opened this issue 1 year ago • 1 comments

I am trying to use this package in a Laravel/Inertia Vue3 application and getting a CORS error for the redirect.

Here is my controller:

class PaystackController extends Controller
{
    public function redirect()
    {
        return paystack()->getAuthorizationUrl(
            ['amount' => 220000, 'email' => auth('web')->user()->email]
        )->redirectNow();
    }
}

Anyone with a similar issue? How was it resolved?

NOTE: The project uses Laravel Breeze with the Sanctum package for authentication.

eokwukwe avatar Aug 31 '24 20:08 eokwukwe

Multiple users? Cus otherwise why would you use auth("web") instead of just auth() or Auth::

Kawesom avatar Sep 10 '24 02:09 Kawesom