Skip to content

mtp-repository/mtp-laravel-with-aad-sso

Repository files navigation


with Azure Active Directory (AAD) Single Sign On (SSO)

Build Status Total Downloads Latest Stable Version License

About

This repo is to help Laravel developer use the Azure Active Directory Admin Center to enable single sign-on (SSO) for an enterprise application that you added to your Azure Active Directory (Azure AD) tenant. After you configure SSO, your users can sign in by using their Azure AD credentials. This is using laravel-azure-ad-oauth package and making some tweaks to make it work.

Installation

Prerequisite

Setup App Registration

Setup Laravel

composer require metrogistics/laravel-azure-ad-oauth:* -w
  • On the env vars of Laravel, place the client ID and client secret.
AZURE_AD_CLIENT_ID=XXXX
AZURE_AD_CLIENT_SECRET=XXXX
  • Finally update the database, make password field nullable and add a new field/column called 'azure_id with VARCHAR(36)'
Add column to users table: ALTER TABLE users ADD COLUMN azure_id VARCHAR(36) AFTER id;
Make password nullable: ALTER TABLE users MODIFY password varchar(255) null;

Usage

Common issues

USE laravel;
ALTER TABLE users ADD COLUMN azure_id VARCHAR(36) AFTER id;
ALTER TABLE users MODIFY password varchar(255) null;
  • 'No CSS and JS, app.js and app.css are not found' Need to run on the project folder:

    • npm install
    • npm run dev (Make Sure Mix is installed properly)
  • View changes does not reflect

php artisan cache:clear

Code of Conduct

In order to ensure that the Laravel community is welcoming to all, please review and abide by the Code of Conduct.

Security Vulnerabilities

If you discover a security vulnerability within Laravel, please send an e-mail to Taylor Otwell via taylor@laravel.com. All security vulnerabilities will be promptly addressed.

Developer

Dinno Ebora - LinkedIn

Credits

Credit belong to metrogistics for creating the package laravel-azure-ad-oauth, no copyright infringement intended.

About

Simple demo of Laravel v8 enabling AAD SSO

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages