Giter Club home page Giter Club logo

auth's Introduction

Auth Logo


Build Status Total Downloads Latest Stable Version License

About

Auth is a plug'n play authentication package for any Laravel application.

Be sure to visit the official documentation at https://devdojo.com/auth/docs

Installation

You can install this package into any new Laravel application, or any of the available Laravel Starter Kits.

composer require devdojo/auth

After the package has been installed you'll need to publish the authentication assets, configs, and more:

php artisan vendor:publish --tag=auth:assets
php artisan vendor:publish --tag=auth:config
php artisan vendor:publish --tag=auth:ci
php artisan vendor:publish --tag=auth:migrations

Next, run the migrations:

php artisan migrate

Finally extend the Devdojo User Model:

use Devdojo\Auth\Models\User as AuthUser;

class User extends AuthUser

in your App\Models\User model.

Now, you're ready to rock! Auth has just been isntalled and you'll be able to visit the following authentication routes:

  • Login (project.test/auth/login)
  • Register (project.test/auth/register)
  • Forgot Password (project.test/auth/register)
  • Password Reset (project.test/auth/password/reset)
  • Password Reset Token (project.test/auth/password/ReAlLyLoNgPaSsWoRdReSeTtOkEn)
  • Password Confirmation (project.test/auth/password/confirm)
  • Two-Factor Challenge (project.test/auth/two-factor-challenge)

You'll also have access to the Two Factor Setup page

  • Two-Factor Setup (project.test/user/two-factor-authentication)

When you need to logout, you can visit the Logout route

  • Logout Route (project.test/auth/logout)

(Optional) Adding the HasSocialProviders Trait.

You can add all the social auth helpers to your user model by including the following Trait:

<?php

namespace App\Models;

use Devdojo\Auth\Traits\HasSocialProviders; // Import the trait

class User extends Devdojo\Auth\Models\User
{
    use HasSocialProviders; // Use the trait in the User model

    // Existing User model code...
}

License

The DevDojo Auth package is open-sourced software licensed under the MIT license.

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.