Skip to content

Authentication for PHP Website with Authgear and OAuth2

Notifications You must be signed in to change notification settings

authgear/authgear-example-php

Repository files navigation

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.
  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

About

Authentication for PHP Website with Authgear and OAuth2

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages