GithubHelp home page GithubHelp logo

orchidsoftware / fortify Goto Github PK

View Code? Open in Web Editor NEW
25.0 11.0 6.0 46 KB

Orchid template optimized for Fortify, an authentication package for Laravel, combining strengths for a robust and secure application environment.

Home Page: https://orchid.software

License: MIT License

PHP 38.43% Blade 61.57%
laravel-auth laravel-fortify hacktoberfest

fortify's Introduction

Template for Fortify

Introduction

Authentication scaffolding with Laravel Orchid template.

Installation

You have to install Laravel Fortify, and complete all setup without add blades calling in App\Providers\FortifyServiceProvider.php.

After installation completed, please add session migration using: (to activate TwoFactorAuthentication method)

php artisan session:table

To get started, install the package using composer:

composer require orchid/fortify

In config/platform.php, disable built-in authorization by changing the value:

/*
|--------------------------------------------------------------------------
| Auth Page
|--------------------------------------------------------------------------
*/

'auth'  => false,

To use on the screen page, use the trait Orchid\Fortify\TwoFactorScreenAuthenticatable:

use Orchid\Fortify\TwoFactorScreenAuthenticatable;

/**
 * Button commands.
 *
 * @return Action[]
 */
public function commandBar(): array
{
    return [
        $this->twoFactorCommandBar(),
    ];
}

/**
 * @return \Orchid\Screen\Layout[]
 */
public function layout(): array
{
    return [
        $this->twoFactorLayout(),
    ];
}

Contributing

Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change. Please see CONTRIBUTING for details.

Security Vulnerabilities

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

License

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

fortify's People

Contributors

czernika avatar drabodan avatar grigoriy-ivanov avatar sadelephant avatar szonov avatar tabuna 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

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

fortify's Issues

Invalid login message is not displayed when fortify is active

Describe the bug
After I activate Fortify, everything is working fine except when I tried to enter invalid credentials, validation exception is not showing.

To Reproduce
Steps to reproduce the behavior:

Install orchidsoftware/fortify
Login via fortify route /login. Not via orchid's route /admin/login
Enter invalid credentials
Expected behavior
Validation should return invalid credentials message.

Screenshots
Not applicable

Desktop (please complete the following information):
OS: Windows 10
Browser Google Chrome
Version 91.0.4472.77 (Official Build) (64-bit)

Server (please complete the following information):
Platfrom Version: 9.21.0
Laravel Version: 8.34.0
PHP Version: 7.3
Database: MySql
Database Version: 5.7.24 - MySQL Community Server (GPL)

Update instructions in README.md

Please add the instructions on how to properly install and how to:

  • enable 2FA
  • use email verification on User registration

I find missing on how to acctually use the 2FA, after it is setup for the user?
The user can login with only password and he is not asked for Authenticator code.
See my comment #8 (comment)

Otherwise I find working great:

  • login user
  • register new user
  • sending email on forgoten password request with password update token (link)
    But I can not figure out how to use email verification e.g. email confirmation for newly registered user, before he can login

I tried to follow https://laracasts.com/discuss/channels/laravel/sending-the-confirmation-e-mail-when-using-fortify-for-the-auth-functions.

I have enabled by default disabled feature emailVerification in config\fortify.ph

    'features' => [
        Features::registration(),
        Features::resetPasswords(),
        Features::emailVerification(),
        Features::updateProfileInformation(),
        Features::updatePasswords(),
        Features::twoFactorAuthentication([
            'confirm' => true,
            'confirmPassword' => true,
            // 'window' => 0,
        ]),
    ],

I have added use Illuminate\Contracts\Auth\MustVerifyEmail; to app\Models\User.php

<?php

namespace App\Models;

use Laravel\Fortify\TwoFactorAuthenticatable;
use Illuminate\Contracts\Auth\MustVerifyEmail;
use Orchid\Filters\Types\Like;
use Orchid\Filters\Types\Where;
use Orchid\Filters\Types\WhereDateStartEnd;
use Orchid\Platform\Models\User as Authenticatable;

class User extends Authenticatable
{
	use TwoFactorAuthenticatable;

....

Composer error

Hello,
I get an error:

`> composer require orchid/fortify
Using version ^0.0.5 for orchid/fortify
./composer.json has been updated
Running composer update orchid/fortify
Loading composer repositories with package information
Updating dependencies
Your requirements could not be resolved to an installable set of packages.

Problem 1
- Root composer.json requires orchid/fortify ^0.0.5 -> satisfiable by orchid/fortify[0.0.5].
- orchid/fortify 0.0.5 requires orchid/platform ^9.6 -> found orchid/platform[9.6.0, ..., 9.x-dev] but it conflicts with your root composer.json require (^10.4).

Use the option --with-all-dependencies (-W) to allow upgrades, downgrades and removals for packages currently locked to specific versions.`

Installation question

Hi, i try to install and configure this module... but at the point To use on the screen page, use the trait Orchid\Fortify\TwoFactorScreenAuthenticatable: i don't know where i have to add this part.

If i add it to my user edit view, i got this error:

Method App\Orchid\Screens\User\UserEditScreen::twoFactorCommandBar does not exist.

I am using Laravel 9 and Orchid 12, can you give me some informations how i can add 2fa?

Remember me does not work anymore

I am using orchid 13.10 with fortify. Everthing works fine, but at the login screen the "Remember Me" does not work. With usage of the internal auth everythings works with "Remember Me".

If compare the login.blade fro the orchid package with the login.blade from the orchid-fortify package the "Remember Me" parts are missing.

Is it correct that this feature is missing here?

And if yes, is it possible to integrate it?

Thx, for your good work.

403 Error

Hi. I have installed the package according to the instructions, and when I register a new user, the registration is successful, but instead of automatically logging into the panel, a 403 error appears, but the user is registered in the Users table. Please, could you tell me how can I fix it ? Thank you.

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.