Skip to content
This repository has been archived by the owner on Jun 13, 2023. It is now read-only.

No auth guard issue #4

Open
SGudbrandsson opened this issue Mar 22, 2020 · 1 comment
Open

No auth guard issue #4

SGudbrandsson opened this issue Mar 22, 2020 · 1 comment

Comments

@SGudbrandsson
Copy link

When I enable this plugin, I get this error:

aws.dev.ERROR: Auth guard [] is not defined.

The issue is caused by these two lines:

'user_id' => optional(auth()->user())->id ?? "-",
'company_id' => optional(auth()->user())->company_id ?? "-",

I recommend either setting a config variable to disable this (default enabled) or removing them completely.

I'm forking this repo and modifying it until then :)

@svensp
Copy link
Collaborator

svensp commented Mar 22, 2020

That code is mostly copied from https://mauri870.github.io/blog/posts/opentracing-jaeger-laravel/

I wouldn't have guessed that it could be a problem since it allows for the user to not exist - just not for the auth guard to be absent.

Anyway if you're going to fork and modify it then I'd suggest you just throw in the config variable and make it a pull request - no need for both of us to write the same code.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants