GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — php-example-applications/php-directory-sync-example at main · workos/php-example-applications

Expand file tree

/

php-directory-sync-example

/
Copy path

Directory actions

More options

More options

Directory actions

More options

More options

Latest commit

 

History

History
History
/

php-directory-sync-example

/
Copy path

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
static
static
 
 
templates
templates
 
 
.gitignore
.gitignore
 
 
LICENSE
LICENSE
 
 
README.md
README.md
 
 
composer.json
composer.json
 
 
router.php
router.php
 
 
variables.php
variables.php
 
 

README.md

Outline

php-directory-sync-example

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

Dependencies

Composer - Link

Setup

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

    git clone [email protected]:workos/php-example-applications
    cd php-example-applications/php-directory-sync-example
    composer i
  2. Follow the instructions here on setting up an SSO connection. The redirect URL for the example app if used as is will be http://localhost:8000/auth/callback.

  3. Create a file at the root of this project called .env and declare the WorkOS API Key, WorkOS Client ID, and Webhooks Secret.

WORKOS_CLIENT_ID="your_client_id"
WORKOS_WEBHOOKS_SECRET="your_webhook_secret"

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.

Test Webhooks

  1. WorkOS sends Webhooks as a way of managing updates to Directory Sync connections. The Webhooks section of the WorkOS Dashboard allows you to send test webhooks to your application. The Test Webhooks section of this application allows you to visualize the validated webhooks directly in this application in real-time. Please review the tutorial here for details on how this can be done locally. The Webhooks secret variable, for which the value can be obtained in the WorkOS dashboard, must be filled out on variables.php to use this feature.
You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.