PHPackages                             vinhhoang/oauth2-azure - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Authentication &amp; Authorization](/categories/authentication)
4. /
5. vinhhoang/oauth2-azure

ActiveLibrary[Authentication &amp; Authorization](/categories/authentication)

vinhhoang/oauth2-azure
======================

Oauth2 Azure login

v1.0.4(2y ago)54.4k↓41.7%6MITPHPPHP &gt;=5.6CI failing

Since Sep 6Pushed 2y ago2 watchersCompare

[ Source](https://github.com/hdvinhhoang/laravel-oauth2-azure)[ Packagist](https://packagist.org/packages/vinhhoang/oauth2-azure)[ RSS](/packages/vinhhoang-oauth2-azure/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (4)Dependencies (2)Versions (3)Used By (0)

Oauth2 Azure login
==================

[](#oauth2-azure-login)

This package is built based on this source [Azure Active Directory Provider for OAuth 2.0 Client](https://github.com/TheNetworg/oauth2-azure).

Installation
------------

[](#installation)

To install, use composer:

```
composer require vinhhoang/oauth2-azure

```

### Configuration

[](#configuration)

After installing the Socialite library, register the `VinhHoang\OAuth2\AzureServiceProvider` in your `config/app.php` configuration file:

```
'providers' => [
    // Other service providers...

    VinhHoang\OAuth2\AzureServiceProvider::class,
],
```

Also, add the `Azure` facade to the `aliases` array in your `app` configuration file:

```
'Azure' =>  VinhHoang\OAuth2\Facades\Azure::class
```

Then, run this comment

`php artisan vendor:publish --provider="VinhHoang\OAuth2\AzureServiceProvider"`

You will also need to add credentials for the OAuth services your application utilizes. These credentials should be placed in your `config/oauth2azure.php` configuration file:

```
[
    'clientId'          => 'your-client-id',
    'clientSecret'      => 'your-client-secret',
    'redirectUri'       => 'your-redirect-uri',
    'tenant'            => 'your-tenant',
],
```

### Basic Usage

[](#basic-usage)

```
