Skip to content

pde159/yii2-authclient-microsoft

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 

Repository files navigation

yii2-authclient-microsoft

Yii2 authclient for Microsoft 365/Azure

Installation

With Composer :

composer require pde159/yii2-authclient-microsoft

or add to "require" section to composer.json

"pde159/yii2-authclient-microsoft": "*"

Usage

First create you Application via Microsoft Azure Portal and configure :

  • a redirect URI
  • a secret key
  • set to all tenant for multitenant availability

And add the Oauth2 client to your Yii2 configuration component section

'components' => [
    'authClientCollection' => [
        'class'   => \yii\authclient\Collection::className(),
        'clients' => [
            'microsoft' => [
                'class'         => 'pde159\authclient\Microsoft',
                'returnUrl'     => 'http://localhost/user/login',
                'clientId'      => 'clientIDyoudefinedInAzurePortal',
                'clientSecret'  => 'SecretyoucratedinAzurePortal',
            ],
            ...
        ],
    ],
    ...
]

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Packages

No packages published