GithubHelp home page GithubHelp logo

johannschopplich / kirby-locked-pages Goto Github PK

View Code? Open in Web Editor NEW
41.0 3.0 2.0 117 KB

πŸ” Password-protect pages, Panel blueprint included

Home Page: https://kirbyseo.com

License: MIT License

PHP 100.00%
kirby kirby-plugin password-lock password security

kirby-locked-pages's Introduction

Visit my link tree

Visit my website

Visit my Instagram

Hi, I’m Johann. I work somewhere in between development and design β€”
A JavaScript one-trick pony with an aesthetic sense.

Projects

My current focus is on the Nuxt and Vue development experience.

Multi-Framework

  • unlazy: πŸͺ§ Universal lazy loading library for placeholder images leveraging native browser APIs

Nuxt.js & Vue.js

  • @nuxtjs/plausible: 🎟️ Plausible Analytics integration for Nuxt
  • nuxt-api-party: 🐬 Securely connect to any API with a server proxy and generated composables
  • nuxt-prepare: 🦎 Build actions for Nuxt
  • nuxt-vitalizer: πŸͺΏ Instantly better LCP scores in Google Lighthouse
  • nuxt-kql: 🫧 Kirby's Query Language API for Nuxt
  • nuxt-gtag: πŸ”Έ Google Analytics & Ads integration made easy
  • vue-stickers: 🍦 One component, multiple fancy sticker variants
  • @byjohann/vue-i18n: 🌐 Lightweight internationalization plugin for Vue

Tooling

  • @unocss/cli: 🎨 The CLI for UnoCSS. A perfect fit for traditional backends.
  • nitro-test-utils: πŸ§ͺ Testing environment and utilities for Nitro
  • pdfjs-serverless: πŸͺ­ Serverless build of PDF.js for Deno, workers, and other nodeless environments
  • kirbyup: πŸ†™ Official bundler for Kirby Panel plugins
  • kirbyuse: πŸŽ›οΈ Collection of Vue Composition utilities and typed window.panel for Kirby CMS

Libraries

  • unpdf: πŸ“„ Utilities to work with PDFs in Node.js, browser and workers
  • tokenx: πŸ“ GPT token estimation and context size utilities without a full tokenizer
  • apiful: ✴️ Unified, pluggable API client management for ofetch, route building and typed OpenAPI clients

Demos / Templates / App Starters

Kirby Plugins

Commercial

Open Source

kirby-locked-pages's People

Contributors

johannschopplich avatar tobimori 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

Watchers

 avatar  avatar  avatar

kirby-locked-pages's Issues

Password-protection not working on homepage

Thanks for this, just what I need.

I installed via composer, the form shows correctly (using on home page) and the url changes to mysite.com/locked?redirect= but when I put in the correct password the page just reloads, no error message - any ideas?

Feature request: add logout option

This is a very nice plugin. The only thing I wish for (at the moment) would be a way to end the session manually, i. e. have a logout link that removes the specific session data.

Missing multilingualism

Hi,

I noticed in a project that this great plug-in unfortunately does not support the multilingual function. Can you fix that? Should I try my hand at it? If second, would you rather do it as a fork or as PR?

Greetings
Tobias

Multi-language sites

Hi!

When you change the URL of the default language (fr), for exemple with 'url' => '/' to hide the default language in the URL, the redirection give a 404, trying to go to /fr/locked?redirect=espace-prive instead of /locked?redirect=espace-prive.

I don't know if it's possible for you to deal with specific URLs ?

Thanks!

Alternative to `kirby-securedpages`?

Hey there..
since https://github.com/kerli81/kirby-securedpages seems to be not under development anymore.. whatabout integrating some features of it in here?

For example:

  • not only restrict by password, but also by user or user-role
  • include subpages
  • filter for exclude pages from search

maybe your Plugin has already such features.. i did not find in the readme..
(my page is still on kirby 3.6.. so i was not able to test quickly, sorry)

Redirect uri overwritten

Small bug is causing the redirect url to be overwritten, so user is not redirected to the correct page.

Expected Behavior:
User should be redirected to /locked?redirect=page-uri

Current Behavior:
User is redirected to /locked?redirect=locked

Bug:
$path parameter is overwritten. You can either rename the variable, or simply move line 16 after the options array definition.

$path = option('kirby-extended.locked-pages.slug', 'locked');
$options = [
'query' => ['redirect' => $path]
];
go(url($path, $options));

ArgumentCountError Too few arguments to function Kirby\Cms\App::{closure}(), 4 passed and exactly 5 expected

I installed the library on Kirby 3.3.2 and PHP 7-73STABLE-STANDARD and the site does not render anymore. When debugging is enabled i get the following error message:

ArgumentCountError Too few arguments to function Kirby\Cms\App::{closure}(), 4 passed and exactly 5 expected

kirby/site/plugins/kirby-locked-pages/extensions/hooks.php

<?php
 
use JohannSchopplich\LockedPages;
 
return [
    'route:after' => function ($route, $path, $method, $result, $final) {

Do you have any suggestion how to solve this error?

Error on Line 8 in locked-pages-login.php

I installed the plugin as a git-submodule and set up everything as mentioned in the documentation. But somehow I got the following error. Is this caused because I'm on localhost?

TypeError thrown with message "esc(): Argument #1 ($string) must be of type string, null given, called in /Applications/MAMP/htdocs/clientsite-2021/site/plugins/kirby-locked-pages/templates/locked-pages-login.php on line 8"

image

Cookie remains valid after password change

If I subsequently change the password in the panel, I remain logged in.
This makes it impossible to lock out users or use a password that changes frequently.

  • Locked Pages 2.1.3
  • Kirby 4.2

The password is also saved in plain text, which poses a security risk.
The plug-in should therefore not be used to protect sensitive content.
This should be indicated in the description.

How to logout via link

Hello,

thank you for your plugin. I am trying to implement a logout-Link in my navigation-bar but I come around to questions:

  1. How do I call kirby()->trigger('locked-pages.logout'); with a link?
  2. I want that link only to appear if user is looked in.

I assumed to do something like this but I get an error "Call to undefined function isLocked()"
<?php if($page.isLocked()):?><a href="<?= kirby()->trigger('locked-pages.logout') ?>">Logout</a><?php endif?>

Do I have to register locked-pages somewhere in my templates first?

I am still new to kirby-plugins and I couldn't find an answer in the forum or kirby help pages.
Thank you for help.

Handle locked route when no redirect parameter

Current Behavior:
When navigating to /locked without any query parameters, an error is thrown since the LockedPages::find method expects a Page object, which it infers from the ?redirect=page-uri value.

Expected/Possible Behavior
Render the Error page when trying to directly access /locked. This can be done by adding a simple check at the top of the controller, such as:

return function ($kirby) {
    $id = get('redirect');
    $targetPage = page($id);

    if (!$id || !$targetPage) {
        go('error');
    }

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.