auth0 / laravel-auth0

Laravel SDK for Auth0 Authentication and Management APIs.
MIT License
246 stars 135 forks source link

Laravel Auth0 breaks when Laravel Telescope is Installed #417

Closed squpshift closed 1 year ago

squpshift commented 1 year ago

Laravel Version

10

SDK Version

7.9.1

PHP Version

PHP 8.2

Description

Laravel Auth0 breaks when Laravel Telescope is Installed.

An HTTP ERROR 500 is thrown when visiting a route.

No errors present in either of php, nginx or laravel.log log files.

Laravel Telescope is a very popular dev package for Laravel. From memory, they were compatible in previous versions of the auth0 package.

How can we reproduce this issue?

Set up new laravel auth0 project

composer create-project --prefer-dist laravel/laravel auth0-laravel-telescope ^10.0

cd auth0-laravel-telescope/

composer require auth0/login:^7.8 --update-with-all-dependencies

php artisan vendor:publish --tag auth0

curl -sSfL https://raw.githubusercontent.com/auth0/auth0-cli/main/install.sh | sh -s -- -b .

./auth0 apps create \
  --name "auth0-laravel-telescope" \
  --type "regular" \
  --auth-method "post" \
  --callbacks "https://auth0-laravel-telescope.test/callback" \
  --logout-urls "https://auth0-laravel-telescope.test" \
  --reveal-secrets \
  --no-input \
  --json > .auth0.app.json
./auth0 apis create \
  --name "auth0-laravel-telescope" \
  --identifier "auth0-laravel-telescope" \
  --offline-access \
  --no-input \
  --json > .auth0.api.json

php artisan migrate

Test working

Visit /login route, login, works well as per below screenshot

Screenshot 2023-06-22 at 4 36 57 PM

Install telescope

composer require laravel/telescope php artisan telescope:install php artisan migrate

Test working with telescope

Screenshot 2023-06-22 at 4 46 51 PM

squpshift commented 1 year ago

Closing as duplicate of https://github.com/auth0/laravel-auth0/issues/412