https://github.com/authgear/authgear-example-laravel
https://github.com/authgear/authgear-example-laravel
Last synced: 6 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/authgear/authgear-example-laravel
- Owner: authgear
- Created: 2023-09-05T08:45:47.000Z (almost 3 years ago)
- Default Branch: main
- Last Pushed: 2023-10-09T04:55:39.000Z (over 2 years ago)
- Last Synced: 2024-12-29T08:21:34.132Z (over 1 year ago)
- Language: PHP
- Size: 116 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# An Example App For Adding User Authentication with Authgear and OAuth 2.0 to a Regular PHP Website.
## What is Authgear?
Authgear is a secure authentication and user management platform. It uses OpenID Connect (OIDC) and OAuth 2.0 to identify who a user is and grant authorization to protected resources.
This repository contains example code for using Authgear in a Laravel project. The example Laravel app allows users to log in using OAuth 2.0. Hence this could also be a good starting point for learning how to add OAuth 2.0 user authentication to a Laravel app.
## How to Run the Project
To run this project on your computer do the following:
1. Sign up for a free Authgear account.
2. Create an Authgear app, and add the configuration for your Authgear project to the Laravel projects env file using the following fields:
```
AUTHGEAR_PROJECT_URL = ""
AUTHGEAR_APP_CLIENT_ID = ""
AUTHGEAR_APP_CLIENT_SECRET = ""
AUTHGEAR_APP_REDIRECT_URI = ""
```
To run the app on you local mechine, run the following commands:
```
php artisan migrate
```
and
```
php artisan serve
```
For a more detailed step-by-step guide on how to use Authgear, check out this post:
[https://docs.authgear.com/get-started/regular-web-app](https://docs.authgear.com/get-started/regular-web-app)