Test fixture for the Auth0 PHP SDK
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
classes/controllers
examples
views
.gitignore
LICENSE.txt
README.md
bootstrap.php
composer.json
composer.lock
example.env
index.php
login.php
logout.php
main.css
phpcs.xml.dist
phpunit.xml.dist
profile.php
screenshot-01.png

README.md

Auth0 PHP Test

This "app" was made to explore, test, and develop the Auth0 PHP SDK.

Installation

This project uses Composer to autoload Auth0 and the classes it uses. Clone this repo somewhere and cd into it. Once that is complete, install Composer (if installed globally):

composer install

Otherwise, download Composer locally and run:

php composer.phar install

Copy the example.env file to .env and replace the values there with what's on your Application settings screen in the Auth0 dashboard (click Create Application if you're starting from scratch).

Now clone the Auth0 repo and composer install there:

> git clone https://github.com/auth0/auth0-PHP.git auth0
> cd auth0
> composer install 
> cd ..

Now, run the built-in PHP server and you're ready to go:

php -S localhost:5000

Visit http://localhost:5000 in your browser and you should see something like this:

Usage

Everything is loaded up in bootstrap.php and output in index.php. The /classes/ directory contains simple examples of how to use the Management API and you'll see those output at the bottom of index.php.

All the code samples in the SDK README are here in files prefixed with readme- so you can run and modify them yourself.