rd/authentication-bundle

User management & authentication bundle

0.2.0 2019-12-06 20:43 UTC

This package is auto-updated.

Last update: 2024-11-07 07:56:35 UTC


README

Packagist PHP from Packagist GitHub last commit GitHub release

Overview

  • Registration
  • Account verify
  • Login & logout
  • Reset password

This is fully configured bundle. Just install & copy/paste configuration.

Preview

Untitled Untitled2

Installation

Install bundle with Composer:

composer require rd/authentication-bundle

Update config/packages/security.yaml

security:
    encoders:
        Rd\AuthenticationBundle\Entity\User:
            algorithm: bcrypt
    providers:
        database_provider:
            entity:
                class: Rd\AuthenticationBundle\Entity\User
    firewalls:
        dev:
            pattern: ^/(_(profiler|wdt)|css|images|js)/
            security: false
        main:
            anonymous: ~
            provider: database_provider
            form_login:
                login_path: rd_authentication_login
                check_path: rd_authentication_login
                csrf_token_generator: security.csrf.token_manager
            logout:
                path: rd_authentication_logout
                target: /

Update config/packages/framework.yaml

framework:
    secret: '%env(APP_SECRET)%'
    csrf_protection: true

Update config/routes/annotation.yaml

rd_authentication:
    resource: ../../vendor/rd/authentication-bundle/Controller/
    type: annotation

Update database schema

bin/console doctrine:schema:update --force

Configuration needed for live usage config/packages/rd_authentication.yaml

rd_authentication:
  homepage: 'http://localhost'
  background: 'http://getwallpapers.com/wallpaper/full/a/5/d/544750.jpg'
  email:
    from: 'no-reply@localhost.net'