thedevdojo / auth

This is the repo for the DevDojo Auth package
https://devdojo.com/auth
MIT License
474 stars 33 forks source link

Not replacing Filament authentication #109

Open kriiv opened 1 month ago

kriiv commented 1 month ago

I've got a clean install of Filament, and then I added this package. All installed fine however I now have my Filament panel authentication & the new auth - with both routes accessible.

Logging in via dojo/auth page logs me in correctly into Filament.

How can I make sure that the only auth used by Filament is the one provided by thedevdojo/auth? Do I somehow delete the filament auth routes?

Here's my php artisan route:list:

image

And here's part of my User model:

<?php

namespace App\Models;

// use Illuminate\Contracts\Auth\MustVerifyEmail;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Foundation\Auth\User as Authenticatable;
use Devdojo\Auth\Models\User as AuthUser;
use Illuminate\Notifications\Notifiable;

class User extends AuthUser
{
    use HasFactory, Notifiable;

    /**
     * The attributes that are mass assignable.
     *
     * @var array<int, string>
     */
    protected $fillable = [
        'name',
        'email',
        'password',
    ];
kiryaba commented 1 month ago

Same Issue am having. Any way to configure it to replace the default filament login page??

skdishansachin commented 1 month ago

To disable the login, you can do so by getting rid of the ->login() authentication feature in the filament. You can find this in app/Providers/Filament/AppPanelProvider.php. Just remove the line or comment it out.

kiryaba commented 1 month ago

Oh Wow works like a charm. Thank you @skdishansachin