Skip to content

Latest commit

 

History

History

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 
 
 
 
 

README.md

php-magic-link-example

An example PHP app demonstrating Magic Link 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-magic-link-example
    composer i
  2. Follow the instructions here on setting up Magic Link.

  3. Create a new file called .env and enter your API Key and Client ID from the WorkOS Dashboard.

WORKOS_API_KEY="your_api_key"
WORKOS_CLIENT_ID="your_client_id"

Running the app

Use the following command to run the app:

php -S localhost:8000 router.php

Once running, you'll be prompted for an email address, simply plug this in and you'll be sent a magiclink that will redirect you to a success page.