Coder Social home page Coder Social logo

marjose123 / filament-lockscreen Goto Github PK

View Code? Open in Web Editor NEW
41.0 1.0 10.0 580 KB

A filament plugin that will allows you to lock your web app page and be able to continue working after re-login, the same with your computer/laptop.

License: MIT License

PHP 78.45% Blade 21.55%
filament laravel lockscreen php

filament-lockscreen's Introduction

Give an ability to the user to lock their access without logging out of the system for a break.

Latest Version on Packagist Total Downloads


๐Ÿšจ For latest version that support FilamentPhp v2.x use this branch 1.x

Installation

You can install the package via composer:

composer require marjose123/filament-lockscreen:"^2.0"

Optionally, you can publish the views using

php artisan vendor:publish --tag="filament-lockscreen-views"

Add the plugin to your panel and add the middleware Locker::class to your panel and you're ready to go

use lockscreen\FilamentLockscreen\Lockscreen;
use lockscreen\FilamentLockscreen\Http\Middleware\Locker;

public function panel(Panel $panel): Panel
{
    return $panel
        // ...
        ->plugin(new Lockscreen());  // <- Add this
         ->authMiddleware([
                // ...
                 Locker::class, // <- Add this
            ]);
}

Testing

composer test

Changelog

Please see CHANGELOG for more information on what has changed recently.

Contributing

If you want to contribute to Filament-lockerscreen packages, you may want to test it in a real Laravel project:

  • Fork this repository to your GitHub account.
  • Create a Laravel app locally.
  • Clone your fork in your Laravel app's root directory.
  • In the /filament-lockscreen directory, create a branch for your fix, e.g. fix/error-message.

Install the packages in your app's composer.json:

{
   // ...
    "require": {
        "marjose123/filament-lockscreen": "*",
    },
    "repositories": [
        {
            "type": "path",
            "url": "filament-lockscreen"
        }
    ],
   // ...
}

Now, run composer update.

Security Vulnerabilities

Please review our security policy on how to report security vulnerabilities.

Credits

License

The MIT License (MIT). Please see License File for more information.

filament-lockscreen's People

Contributors

dependabot[bot] avatar github-actions[bot] avatar homaeee avatar lucasgiovanny avatar marjose123 avatar mltdev avatar nicolasbaud avatar rawand201 avatar tgeorgel avatar valpuia avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

filament-lockscreen's Issues

Redirection

after login in again it is redirecting to the home page rather it should be redirected to the admin panel.

Issue with Custom Guard and Provider in Filament - "Route [login] not defined" Error

Discussed in #46

Originally posted by jmendozaf December 7, 2023
In my application, I have set up a custom guard and provider (admin) in config/auth.php to handle authentication instead of the default web, primarily for Filament only. I thought this might be causing some conflicts with the lockscreen package, particularly with route definitions.

The specific error I am facing is: "Route [login] not defined." This error occurs when trying to lock my screen, and I suspect it is related to my custom admin guard and provider setup.

Add a Condition in Middleware

Discussed in #12

Originally posted by PeranoXx October 10, 2022
add $request->segment(1) == 'admin' in Locker middleware. to apply locker only in admin panel and not it frontend

image

Use username or other custom field to login

Discussed in #29

Originally posted by clerisonb May 31, 2023
Is it possible to customize the field used to authenticate in the lock screen? I'm using a custom field, but the plugin seems to look for "email" only.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.