Skip to content

Jetstream & Custom auth guard #4683

@georgecoca

Description

@georgecoca
  • Laravel Version: 9.24.0
  • Nova Version: 4.12.14
  • Laravel JetStream: 2.11.0

Description:

If the application has JetStream installed and configured a custom auth guard with a provider eloquent (example: App/Models/Admin) when authenticating in Nova it throws an error:

Call to undefined method App\Models\Admin::allTeams()

Which seems that in Nova the middleware \Laravel\Jetstream\Http\Middleware\ShareInertiaData is loaded too which causes the issue.

Detailed steps to reproduce the issue on a fresh Nova installation:

  1. Have JetStream installed
  2. Create a custom auth guard
  3. Set the guard in nova config as the default
  4. Authenticate in Nova
  5. Error occurs.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions