Download the PHP package auth0-samples/laravel without Composer

On this page you can find all versions of the php package auth0-samples/laravel. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package laravel

Auth0 Laravel SDK

:books: Default Changes

This is a sample project demonstrating how to integrate the Auth0 Laravel SDK into a Laravel 9 application. For Laravel 10 applications, the integration steps are identical.

Documentation

Guidance on integrating Auth0 into your Laravel application can be found here:

You may also find the following documentation from the SDK's GitHub repository useful:

Getting Started

Use Composer's create-project command to clone this repository and install the dependencies:

Authenticate with Auth0 using the bundled Auth0 CLI:

Note
Authenticate as a "user" if prompted.

Create an Auth0 Application:

Create an Auth0 API:

Run the application:

Demonstration Routes

This sample includes a few demonstration routes to help you get started.

Session-Based Authentication

The SDK automatically registers the following routes for session-based authentication:

Method Route Description
GET /login Starts the user authentication flow. Sets up some initial cookies, and redirects to Auth0 to authenticate.
GET /callback Handles the return callback from Auth0. Completes setting up the user's Laravel session.
GET /logout Logs the user out.

The routes/web.php file contains routes that demonstrate working with session-based authentication. These are:

Method Route Description
GET /private Demonstrates how to protect a route with the auth middleware.
GET /scope Demonstrates how to protect a route with the can middleware.
GET /colors Demonstrates how to make Management API calls.

Token-Based Authorization

The routes/api.php file contains routes that demonstrate token-based authorization. These are:

Method Route Description
GET /api Demonstrates how to extract information from the request token.
GET /api/private Demonstrates how to protect an API route with the auth middleware.
GET /api/scope Demonstrates how to protect an API route with the can middleware.
GET /api/me Demonstrates how to make Management API calls.

Changes to the Default Laravel Application

This sample is based on the default Laravel application you can create using laravel new or composer create-project.

Note
For Laravel 10, use composer create-project laravel/laravel:^10.0 and follow the same steps outlined below.

Few changes are necessary to get started, as the SDK automatically sets up all the necessary guards, middleware and other services necessary to support authentication and authorization. The following is a list of changes that have been applied:

Feedback

We appreciate your feedback! Please create an issue in this repository or reach out to us on Community.

Vulnerability Reporting

Please do not report security vulnerabilities on the public GitHub issue tracker. The Responsible Disclosure Program details the procedure for disclosing security issues.

What is Auth0?

Auth0 helps you to easily:

Why Auth0?

License

This project is licensed under the MIT license. See the LICENSE file for more info.


All versions of laravel with dependencies

PHP Build Version
Package Version
Requires php Version ^8.0
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package auth0-samples/laravel contains the following files

Loading the files please wait ....