Skip to content

somemove/auth0-nette-extension

master
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
src
 
 
 
 
 
 
 
 
 
 

Latest Stable Version Total Downloads License

Auth0 Nette Extension

This is Auth0 authentication extension for Nette framework.

It integrates Auth0 PHP SDK.

Installation

Download extension using Composer.

composer require somemove/auth0-nette-extension
extensions:
	auth0: \Somemove\Auth0NetteExtesion\DI\Auth0NetteExtesion

Configuration

Configure extension in your config.neon file:

auth0:
	'domain' : 'your.auth0.com'
	'audience' : 'https://audience.url'
	'scope' : 'openid profile offline_access'
	'client_id' : '{CLIENT_ID}'
	'client_secret' : '{CLIENT_SECRET}'
	'redirect_uri' : 'https://your.callback'

Following properties have defaults values in the extension and can be ommited in your configuration:

  • persist_user
  • persist_access_token
  • persist_refresh_token
  • persist_id_token
  • store
  • state_handler
  • debug

In order to disable persistence of user, or tokens into Nette session object, either set store to FALSE for global setting or respective attribute to FALSE.

Usage

class YourPresenter extends Presenter {

	/**
	 * @var \Auth0\SDK\Auth0 @inject
	 */
	public $auth0;

	public function actionLogin() {
		$this->auth0->login();
	}

}

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages