All Projects → awes-io → auth

awes-io / auth

Licence: MIT license
🔑 Laravel Authentication package with built-in two-factor (Authy) and social authentication (Socialite).

Programming Languages

PHP
23972 projects - #3 most used programming language
HTML
75241 projects
Dockerfile
14818 projects

Projects that are alternatives of or similar to auth

Php Auth
Authentication for PHP. Simple, lightweight and secure.
Stars: ✭ 713 (+1728.21%)
Mutual labels:  auth, authorization, registration
authorizer
Your data, your control. Fully open source, authentication and authorization. No lock-ins. Deployment in Railway in 120 seconds || Spin a docker image as a micro-service in your infra. Built in login page and Admin panel out of the box.
Stars: ✭ 770 (+1874.36%)
Mutual labels:  auth, authorization, 2fa
Graphql Directive Auth
GraphQL directive for handling auth
Stars: ✭ 120 (+207.69%)
Mutual labels:  auth, authorization
Node Rate Limiter Flexible
Node.js rate limit requests by key with atomic increments in single process or distributed environment.
Stars: ✭ 1,950 (+4900%)
Mutual labels:  auth, authorization
Redis Adapter
Redis adapter for Casbin
Stars: ✭ 167 (+328.21%)
Mutual labels:  auth, authorization
apache 2fa
Apache two-factor (2FA) authentication with Google Authenticator based on Time-based One-Time Password (TOTP) or HMAC-based one-time password (HOTP) Algorithms.
Stars: ✭ 63 (+61.54%)
Mutual labels:  authy, 2fa
Simpleacl
Simple ACL for PHP
Stars: ✭ 105 (+169.23%)
Mutual labels:  auth, authorization
Vuejs2 Authentication Tutorial
Stars: ✭ 144 (+269.23%)
Mutual labels:  auth, authorization
Brandenburg
Laravel Authentication Package
Stars: ✭ 79 (+102.56%)
Mutual labels:  auth, authorization
Mosquitto Go Auth
Auth plugin for mosquitto.
Stars: ✭ 212 (+443.59%)
Mutual labels:  auth, authorization
Go Guardian
Go-Guardian is a golang library that provides a simple, clean, and idiomatic way to create powerful modern API and web authentication.
Stars: ✭ 204 (+423.08%)
Mutual labels:  auth, 2fa
caddy-security
🔐 Authentication, Authorization, and Accounting (AAA) App and Plugin for Caddy v2. 💎 Implements Form-Based, Basic, Local, LDAP, OpenID Connect, OAuth 2.0 (Github, Google, Facebook, Okta, etc.), SAML Authentication. MFA/2FA with App Authenticators and Yubico. 💎 Authorization with JWT/PASETO tokens. 🔐
Stars: ✭ 696 (+1684.62%)
Mutual labels:  auth, authorization
Sentinel
A framework agnostic authentication & authorization system.
Stars: ✭ 1,354 (+3371.79%)
Mutual labels:  auth, authorization
Jcasbin
An authorization library that supports access control models like ACL, RBAC, ABAC in Java
Stars: ✭ 1,335 (+3323.08%)
Mutual labels:  auth, authorization
Node Casbin
An authorization library that supports access control models like ACL, RBAC, ABAC in Node.js and Browser
Stars: ✭ 1,757 (+4405.13%)
Mutual labels:  auth, authorization
Casbin
An authorization library that supports access control models like ACL, RBAC, ABAC in Golang
Stars: ✭ 10,872 (+27776.92%)
Mutual labels:  auth, authorization
Fosite
Extensible security first OAuth 2.0 and OpenID Connect SDK for Go.
Stars: ✭ 1,738 (+4356.41%)
Mutual labels:  auth, authorization
Bouncer
Eloquent roles and abilities.
Stars: ✭ 2,763 (+6984.62%)
Mutual labels:  auth, authorization
Authex
Authex is an opinionated JWT authentication and authorization library for Elixir.
Stars: ✭ 73 (+87.18%)
Mutual labels:  auth, authorization
Flexiblelogin
A Sponge minecraft server plugin for second factor authentication
Stars: ✭ 73 (+87.18%)
Mutual labels:  auth, 2fa

Awes.io logo

Authentication

Laravel Authentication package with built-in two-factor (Authy) and social authentication (Socialite).

Coverage report Last version Build status Downloads License CDN Ready laravel Last commit Analytics Hosted by Package Kit Patreon

Laravel Authentication

Table of Contents

Installation

Via Composer

$ composer require awes-io/auth

The package will automatically register itself.

You can publish migrations:

php artisan vendor:publish --provider="AwesIO\Auth\AuthServiceProvider" --tag="migrations"

After migrations have been published you can create required db tables by running:

php artisan migrate

Publish views:

php artisan vendor:publish --provider="AwesIO\Auth\AuthServiceProvider" --tag="views"

Configuration

Publish config file:

php artisan vendor:publish --provider="AwesIO\Auth\AuthServiceProvider" --tag="config"

You can disable additional features by commenting them out:

'enabled' => [
    'social', 
    // 'two_factor',
    // 'email_verification',
],

Add new socialite services:

'services' => [
    'github' => [
        'name' => 'GitHub'
    ],
    ...
],
'github' => [
    'client_id' => env('GITHUB_CLIENT_ID'),
    ...
],

And configure redirect paths:

'redirects' => [
    'login' => '/twofactor',
    'reset_password' => '/',
    ...
],

Social and two-factor authentication

Several .env variables required if additional modules were enabled in config:

# SOCIALITE GITHUB
GITHUB_CLIENT_ID=
GITHUB_CLIENT_SECRET=
GITHUB_REDIRECT_URL=http://auth.test/login/github/callback

# TWO FACTOR AUTHY
AUTHY_SECRET=

If you enabled social and/or two factor authentication add respective traits to User model class:

use AwesIO\Auth\Models\Traits\HasSocialAuthentication;
use AwesIO\Auth\Models\Traits\HasTwoFactorAuthentication;

class User extends Authenticatable
{
    use HasSocialAuthentication, HasTwoFactorAuthentication;
}

Email verification & resetting passwords

To use email verification functionality and to reset passwords, add SendsEmailVerification and SendsPasswordReset traits:

use AwesIO\Auth\Models\Traits\SendsPasswordReset;
use AwesIO\Auth\Models\Traits\SendsEmailVerification;

class User extends Authenticatable
{
    use SendsEmailVerification, SendsPasswordReset;
}

Usage

Add to routes/web.php:

AwesAuth::routes();

You can disable registration:

AwesAuth::routes(['register' => false]);

Package will register several routes.

Besides default authentication routes, it will add:
  • Socialite routes
    • 'login.social'
    • 'login/{service}/callback'
  • Two factor authentication setup routes
    • 'twofactor.index'
    • 'twofactor.store'
    • 'twofactor.destroy'
    • 'twofactor.verify'
  • Two factor authentication login routes
    • 'login.twofactor.index'
    • 'login.twofactor.verify'
  • Email verification routes
    • 'verification.resend'
    • 'verification.code.verify'
    • 'verification.code'
    • 'verification.verify'

Testing

You can run the tests with:

composer test

Contributing

Please see contributing.md for details and a todolist.

Credits

License

MIT

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].