Skip to content
This repository has been archived by the owner on Dec 21, 2023. It is now read-only.

FusionAuth/fusionauth-example-laravel

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
 
 
app
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Laravel with FusionAuth Example

This app is an example Laravel application. It delegates user management, registration and login to FusionAuth. It uses a middleware to ensure that only signed in users can access certain pages.

Read more about how to set this up and run it HERE.

Setting up this rep

  1. Run composer install (or composer update if prompted)
  2. Rename example.env to .env
  3. Update .env file and add three keys and their appropriate value:
    • FUSIONAUTH_APP_ID=<your_app_id>
    • FUSIONAUTH_API_KEY=<your_api_key>
    • FUSIONAUTH_BASE_URL=<where_fusionauth_is_running_usually_http://localhost:9011>
  4. If you run into trouble and see these screens, you can try the fixes below. 500-error php-gen-key
    • Please execute these commands from the root directory of the project in the terminal.
    • php artisan key:generate
      • This will generate a unique APP_KEY. See more here
      • You can also click the generate app key button and have this done for you in the UI (as shown)
    • sudo chmod -R 777 vendor
      • This will allow everyone to write and execute your vendor files in the project.

Git Log

This Git history follows the headings on the tutorial. Each commit SHA follows the progress of the tutorial, header by header. One can checkout each commit and see the code in realtime if you get stuck following along (or use Github to view the diff).

SHA Heading in Tutorial
6378981 Logging out
c385639 Showing the current user’s profile
f9cfff1 Logging a user in
8260d3d Registering a new user
b87d132 Installing and configuring the FusionAuth PHP package
5734d71 Setting up a new Laravel Application

Requirements

  1. This example application was tested using:
    • Php 7.2

About

A demo using FusionAuth to manage user authentication in Laravel

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published