-
-
Notifications
You must be signed in to change notification settings - Fork 102
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
installation > The given role or permission should use guard ` instead of
web`.
#106
Comments
Did you do this?
https://vanilo.io/docs/2.x/installation#laravel-auth-support |
yes i did. |
same problem here :/ have any solutions ? thx composer.json file : |
Could you please paste the output of these commands? php -v
composer --version
composer show Thx! |
ayhan@mvk ~ % php -v ayhan@mvk ~ % composer --version ayhan@mvk ~ % composer show |
@ayhanbaris is it the complete list of composer packages? I don't see |
ayhan@mvk vaniloapp % composer show |
Looks good now. Can you add a superuser yet? |
What's the content of |
this is |
of :) |
<?php
return [
/*
|--------------------------------------------------------------------------
| Authentication Defaults
|--------------------------------------------------------------------------
|
| This option controls the default authentication "guard" and password
| reset options for your application. You may change these defaults
| as required, but they're a perfect start for most applications.
|
*/
'defaults' => [
'guard' => 'web',
'passwords' => 'users',
],
/*
|--------------------------------------------------------------------------
| Authentication Guards
|--------------------------------------------------------------------------
|
| Next, you may define every authentication guard for your application.
| Of course, a great default configuration has been defined for you
| here which uses session storage and the Eloquent user provider.
|
| All authentication drivers have a user provider. This defines how the
| users are actually retrieved out of your database or other storage
| mechanisms used by this application to persist your user's data.
|
| Supported: "session", "token"
|
*/
'guards' => [
'web' => [
'driver' => 'session',
'provider' => 'users',
],
'api' => [
'driver' => 'token',
'provider' => 'users',
'hash' => false,
],
],
/*
|--------------------------------------------------------------------------
| User Providers
|--------------------------------------------------------------------------
|
| All authentication drivers have a user provider. This defines how the
| users are actually retrieved out of your database or other storage
| mechanisms used by this application to persist your user's data.
|
| If you have multiple user tables or models you may configure multiple
| sources which represent each model / table. These sources may then
| be assigned to any extra authentication guards you have defined.
|
| Supported: "database", "eloquent"
|
*/
'providers' => [
'users' => [
'driver' => 'eloquent',
'model' => App\Models\User::class,
],
// 'users' => [
// 'driver' => 'database',
// 'table' => 'users',
// ],
],
/*
|--------------------------------------------------------------------------
| Resetting Passwords
|--------------------------------------------------------------------------
|
| You may specify multiple password reset configurations if you have more
| than one user table or model in the application and you want to have
| separate password reset settings based on the specific user types.
|
| The expire time is the number of minutes that the reset token should be
| considered valid. This security feature keeps tokens short-lived so
| they have less time to be guessed. You may change this as needed.
|
*/
'passwords' => [
'users' => [
'provider' => 'users',
'table' => 'password_resets',
'expire' => 60,
'throttle' => 60,
],
],
/*
|--------------------------------------------------------------------------
| Password Confirmation Timeout
|--------------------------------------------------------------------------
|
| Here you may define the amount of seconds before a password confirmation
| times out and the user is prompted to re-enter their password via the
| confirmation screen. By default, the timeout lasts for three hours.
|
*/
'password_timeout' => 10800,
]; |
Do you have |
How do you do this part: https://vanilo.io/docs/2.x/installation#step-3-register-the-model in the AppServiceProvider class? |
public function register()
{
$this->app->concord->registerModel(\Konekt\User\Contracts\User::class, \App\Models\User::class);
} |
What's the content of |
namespace App\Models;
use Illuminate\Contracts\Auth\MustVerifyEmail;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Foundation\Auth\User as Authenticatable;
use Illuminate\Notifications\Notifiable;
class User extends \Konekt\AppShell\Models\User
{
} |
Everything looks good 😳 php artisan concord:modules -a ? |
|
Is it possible for you to delete and recreate the entire database with I have no better ideas left... |
I also redid the installation several times, using the recommendations mentioned above, but still the same problem i have same config as @ayhanbaris thx |
Is there any chance to pack the entire application along with vendor and everything + a db dump and pass the zip link to me? |
I advance! in 'providers' => [
'users' => [
'driver' => 'eloquent',
'model' => Konekt\AppShell\Models\User::class,
],
], and the superadmin registration is ok ! I think the problem comes from the filters on the models in I don't have time to investigate more, I will if I have free time 👍 |
Thanks for the update. I'll take a look when I'll have free time :) |
i have the same problem and the change in auth.php to Konekt\AppShell\Models\User::class does not solve it for me. In the db however an admin user is created. (do not know if other tables should have added tupels) after the whole install if i login i get: but i am logged in. |
@ayhanbaris, have you ever solved this issue? |
I have same issue with laravel breeze |
I have the same problem and maybe I know the reason. <?php
return [
'modules' => [
Vanilo\Foundation\Providers\ModuleServiceProvider::class, // <------- DO NOT DELETE THIS LINE !
Konekt\AppShell\Providers\ModuleServiceProvider::class => [
'ui' => [
'name' => 'Shop Admin', // Your app's name to display on admin
'url' => '/admin/product', // Base/Home URL after login (eg. dashboard)
],
],
Vanilo\Admin\Providers\ModuleServiceProvider::class,
],
'register_route_models' => true,
]; |
Role name [admin]:
User '[email protected]' has been created (id: 1)
Konekt\Acl\Exceptions\GuardDoesNotMatch
The given role or permission should use guard `` instead of
web
.at vendor/konekt/acl/src/Exceptions/GuardDoesNotMatch.php:12
8▕ class GuardDoesNotMatch extends InvalidArgumentException
9▕ {
10▕ public static function create(string $givenGuard, Collection $expectedGuards)
11▕ {
➜ 12▕ return new static("The given role or permission should use guard
{$expectedGuards->implode(', ')}
instead of{$givenGuard}
.");13▕ }
14▕ }
15▕
19 artisan:37
Illuminate\Foundation\Console\Kernel::handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
The text was updated successfully, but these errors were encountered: