An open API service indexing awesome lists of open source software.

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

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)