Skip to content

Files

Latest commit

 

History

History

php-mfa-example

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 
 
 
 
 

php-sso-example

An example PHP app demonstrating MFA with the WorkOS PHP SDK.

Dependencies

Composer - Link

Setup

  1. Clone the repo and install the dependencies by running the following:

    git clone git@github.com:workos/php-example-applications
    cd php-example-applications/php-mfa-example
    composer i
  2. Follow the instructions here on setting up MFA.

  3. Edit lines 9-10 of router.php to declare the WorkOS API Key, and WorkOS Client ID

Running the app

Use the following command to run the app:

php -S localhost:8000 router.php

Once running, navigate to the following URL for a demonstration on the SSO workflow: http://localhost:8000.