https://github.com/authgear/authgear-example-php
Authentication for PHP Website with Authgear and OAuth2
https://github.com/authgear/authgear-example-php
Last synced: 8 months ago
JSON representation
Authentication for PHP Website with Authgear and OAuth2
- Host: GitHub
- URL: https://github.com/authgear/authgear-example-php
- Owner: authgear
- Created: 2023-08-11T06:52:03.000Z (almost 3 years ago)
- Default Branch: main
- Last Pushed: 2024-03-12T15:11:26.000Z (over 2 years ago)
- Last Synced: 2024-12-29T08:21:31.308Z (over 1 year ago)
- Language: PHP
- Size: 103 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 example app is written in regular PHP without any framework. It uses Authgear to allow users to log in to a website and request protected resources.
## How to Run the Project
1. Before you run this project on your local machine, sign up for a [free Authgear account](https://authgear.com).
2. Create an Authgear app, of type OIDC in Authgear Portal.
3. Clone this project on your local machine by running the following command:
```git clone https://github.com/authgear/authgear-example-php.git```
4. Add the configuration (`Client ID`, `Client Secret`, `Authgear App URL`, `Redirect URI`) for your Authgear app to the `.env` file.
5. Run `composer update`
6. Run the project on your local PHP/Apache server like XAMPP/WAMP or via CLI
For a more detailed step-by-step guild on how to use Authgear with PHP, check out this post:
[https://docs.authgear.com/get-started/regular-web-app](https://docs.authgear.com/get-started/regular-web-app)