{"id":27457689,"url":"https://github.com/youneslaaroussi/passage","last_synced_at":"2025-04-15T19:52:33.493Z","repository":{"id":176591184,"uuid":"659235433","full_name":"youneslaaroussi/Passage","owner":"youneslaaroussi","description":"1Password Passage SDK for PHP.","archived":false,"fork":false,"pushed_at":"2023-06-30T18:11:53.000Z","size":1281,"stargazers_count":6,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-03-24T18:51:00.038Z","etag":null,"topics":["1password","apache","authentication","backend","laravel","php","server","symfony"],"latest_commit_sha":null,"homepage":"https://eludadev.hashnode.dev/passage-php-sdk#cljl09s5805qwjgnvdq38e57c","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/youneslaaroussi.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-06-27T12:04:58.000Z","updated_at":"2025-01-06T15:25:46.000Z","dependencies_parsed_at":null,"dependency_job_id":"7ebdca6d-c277-4d56-9763-842d0c5ac2a0","html_url":"https://github.com/youneslaaroussi/Passage","commit_stats":{"total_commits":1,"total_committers":1,"mean_commits":1.0,"dds":0.0,"last_synced_commit":"4b24e3c8ece66440b067bcfa2444f75b1107c883"},"previous_names":["eludadev/passage","youneslaaroussi/passage"],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/youneslaaroussi%2FPassage","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/youneslaaroussi%2FPassage/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/youneslaaroussi%2FPassage/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/youneslaaroussi%2FPassage/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/youneslaaroussi","download_url":"https://codeload.github.com/youneslaaroussi/Passage/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":249144903,"owners_count":21219966,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["1password","apache","authentication","backend","laravel","php","server","symfony"],"created_at":"2025-04-15T19:52:32.046Z","updated_at":"2025-04-15T19:52:33.485Z","avatar_url":"https://github.com/youneslaaroussi.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003ca name=\"readme-top\"\u003e\u003c/a\u003e\n\n\u003c!-- PROJECT SHIELDS --\u003e\n\u003c!--\n*** I'm using markdown \"reference style\" links for readability.\n*** Reference links are enclosed in brackets [ ] instead of parentheses ( ).\n*** See the bottom of this document for the declaration of the reference variables\n*** for contributors-url, forks-url, etc. This is an optional, concise syntax you may use.\n*** https://www.markdownguide.org/basic-syntax/#reference-style-links\n--\u003e\n\n[![Contributors][contributors-shield]][contributors-url]\n[![Forks][forks-shield]][forks-url]\n[![Stargazers][stars-shield]][stars-url]\n[![Issues][issues-shield]][issues-url]\n[![MIT License][license-shield]][license-url]\n\n\u003c!-- PROJECT LOGO --\u003e\n\u003cbr /\u003e\n\u003cdiv align=\"center\"\u003e\n  \u003ca href=\"https://github.com/eludadev/Passage\"\u003e\n    \u003cimg src=\"assets/logo.svg\" alt=\"Logo\" height=\"80\"\u003e\n  \u003c/a\u003e\n\n\u003ch3 align=\"center\"\u003ePassage PHP SDK\u003c/h3\u003e\n\n  \u003cp align=\"center\"\u003e\n    1Password Passage SDK for PHP Developers.\n    \u003cbr /\u003e\n    \u003ca href=\"https://shelf.eluda.dev/passage-php-sdk\"\u003e\u003cstrong\u003eRead the article »\u003c/strong\u003e\u003c/a\u003e\n    \u003cbr /\u003e\n    \u003cbr /\u003e\n    \u003ca href=\"https://github.com/eludadev/Passage/issues\"\u003eReport Bug\u003c/a\u003e\n    ·\n    \u003ca href=\"https://github.com/eludadev/Passage/issues\"\u003eRequest Feature\u003c/a\u003e\n  \u003c/p\u003e\n\u003c/div\u003e\n\n\u003c!-- TABLE OF CONTENTS --\u003e\n\u003cdetails\u003e\n  \u003csummary\u003eTable of Contents\u003c/summary\u003e\n  \u003col\u003e\n    \u003cli\u003e\n      \u003ca href=\"#about-the-project\"\u003eAbout The Project\u003c/a\u003e\n      \u003cul\u003e\n        \u003cli\u003e\u003ca href=\"#built-with\"\u003eBuilt With\u003c/a\u003e\u003c/li\u003e\n      \u003c/ul\u003e\n    \u003c/li\u003e\n    \u003cli\u003e\n      \u003ca href=\"#getting-started\"\u003eGetting Started\u003c/a\u003e\n      \u003cul\u003e\n        \u003cli\u003e\u003ca href=\"#prerequisites\"\u003ePrerequisites\u003c/a\u003e\u003c/li\u003e\n        \u003cli\u003e\u003ca href=\"#installation\"\u003eInstallation\u003c/a\u003e\u003c/li\u003e\n      \u003c/ul\u003e\n    \u003c/li\u003e\n    \u003cli\u003e\n      \u003ca href=\"#usage\"\u003eUsage\u003c/a\u003e\n      \u003cul\u003e\n        \u003cli\u003e\u003ca href=\"#authenticating-requests\"\u003eAuthenticating Requests\u003c/a\u003e\u003c/li\u003e\n        \u003cli\u003e\u003ca href=\"#authenticating-a-request-with-PHP-middleware\"\u003eAuthenticating a Request With PHP Middleware\u003c/a\u003e\u003c/li\u003e\n        \u003cli\u003e\u003ca href=\"#app-information\"\u003eApp Information\u003c/a\u003e\u003c/li\u003e\n        \u003cli\u003e\u003ca href=\"#user-management\"\u003eUser Management\u003c/a\u003e\u003c/li\u003e\n        \u003cli\u003e\u003ca href=\"#user-device-management\"\u003eUser Device Management\u003c/a\u003e\u003c/li\u003e\n        \u003cli\u003e\u003ca href=\"#creating-magic-links\"\u003eCreating Magic Links\u003c/a\u003e\u003c/li\u003e\n      \u003c/ul\u003e\n    \u003c/li\u003e\n    \u003cli\u003e\u003ca href=\"#example-usage\"\u003eExample usage\u003c/a\u003e\u003c/li\u003e\n    \u003cli\u003e\u003ca href=\"#contributing\"\u003eContributing\u003c/a\u003e\u003c/li\u003e\n    \u003cli\u003e\u003ca href=\"#license\"\u003eLicense\u003c/a\u003e\u003c/li\u003e\n    \u003cli\u003e\u003ca href=\"#contact\"\u003eContact\u003c/a\u003e\u003c/li\u003e\n    \u003cli\u003e\u003ca href=\"#acknowledgments\"\u003eAcknowledgments\u003c/a\u003e\u003c/li\u003e\n  \u003c/ol\u003e\n\u003c/details\u003e\n\n\u003c!-- ABOUT THE PROJECT --\u003e\n\n## About The Project\n\n[![1Password’s Passage SDK for PHP Developers.][product-screenshot]](https://github.com/eludadev/Passage)\n\nIntroducing Passage SDK for PHP:\n\n- Seamless integration with 1Password's Passage API\n- Secure storage and retrieval of secrets\n- Magic link authentication implementation\n- Robust error handling\n- Automatic conversion to native PHP `DateTime` objects\n- Middleware support for easy integration\n- Powerful SDK features for enhanced security in PHP projects\n\n\u003cp align=\"right\"\u003e(\u003ca href=\"#readme-top\"\u003eback to top\u003c/a\u003e)\u003c/p\u003e\n\n\u003c!-- GETTING STARTED --\u003e\n\n## Getting Started\n\n### Prerequisites\n\nStart by creating a `laravel/laravel` project using PHP composer:\n\n- composer\n  ```sh\n  laravel new my-php-project\n  ```\n\n### Installation\n\n1. Create a [Passage account](https://console.passage.id/register)\n2. Create a new [Passage application](https://console.passage.id/)\n3. Retrieve your application's `\u003cAPP_ID\u003e` and [`\u003cAPI_KEY\u003e`](https://console.passage.id/settings)\n4. Add `\u003cAPP_ID\u003e` and `\u003cAPI_KEY\u003e` to your local `.env` file:\n   ```bash\n   APP_ID=your_app_id\n   API_KEY=your_api_key\n   ```\n5. Install package from [Packagist](https://packagist.org/packages/eludadev/passage)\n   ```sh\n   composer require eludadev/passage\n   ```\n6. Import the `Passage` class\n   ```php\n   use Eludadev\\Passage\\Passage;\n   ```\n7. Create an instance of the `Passage` class. \\\n   Set `\u003cAUTH_STRATEGY\u003e` to either `'COOKIES'` (_default_) or `'HEADER'`.\n   ```php\n   $passage = new Passage(env('APP_ID'), env('API_KEY'), '\u003cAUTH_STRATEGY\u003e' /* optional */);\n   ```\n\n\u003cp align=\"right\"\u003e(\u003ca href=\"#readme-top\"\u003eback to top\u003c/a\u003e)\u003c/p\u003e\n\n\u003c!-- USAGE EXAMPLES --\u003e\n\n## Usage\n\nAuthenticate requests and manage Passage users with Node.js.\n\n\u003e **Warning**\n\u003e To use the Passage PHP SDK, you'll need your Passage App ID. You can create a new Passage App in the [console](https://console.passage.id/).\n\n\u003e **Note**\n\u003e Assuming you followed the above prerequisites to create a new `laravel/laravel` project, you can quickly get started using this SDK in your API routes by opening the `routes/web.php` file and adding the following code:\n\n```php\nuse Illuminate\\Http\\Request;\nuse Eludadev\\Passage\\Passage;\nuse Illuminate\\Support\\Facades\\Route;\n\nRoute::get('/passage', function (Request $request) {\n    $passage = new Passage(env('APP_ID'), env('API_KEY'));\n    return $passage-\u003ecreateMagicLink(\"example@domain.com\", \"/redirect\");\n});\n```\n\n### Authenticating Requests\n\nPassage makes it easy to associate an HTTP request with an authenticated user. The following code can be used to validate that a request was made by an authenticated user.\n\n```php\nuse Illuminate\\Http\\Request;\nuse Eludadev\\Passage\\Passage;\nuse Illuminate\\Support\\Facades\\Route;\n\n// Authentication using Passage class instance\nRoute::get('authenticatedRoute', function (Request $request) {\n    $passage = new Passage(env('APP_ID'), env('API_KEY'));\n\n    try {\n        // Authenticate request using Passage\n        $userID = $passage-\u003eauthenticateRequest($request);\n        if ($userID) {\n            // User is authenticated\n            $userData = $passage-\u003euser-\u003eget($userID);\n            return;\n        }\n    } catch (\\Exception $e) {\n        // Authentication failed\n        return \"Authentication failed!\";\n    }\n});\n```\n\nBy default, Passage looks for the user JWT from a cookie that is set by the Passage Element (`psg_auth_token`). If your application uses Authorization headers instead, you can pass the following option to the Passage PHP SDK.\n\n```php\n$passage = new Passage(env('APP_ID'), env('API_KEY'), 'HEADER');\n```\n\n### Authenticating a Request With PHP Middleware\n\nIf you used the `laravel/laravel` project, Passage provides a middleware that can be used directly. This middleware will authenticate a request and return a 401 Unauthorized if the token is invalid. If it succeeds, the Passage User ID will be available in the response. The following code shows how the Passage middleware can be used in a PHP application.\n\n```php\nuse Illuminate\\Support\\Facades\\Route;\nuse Illuminate\\Http\\Request;\n\nuse Eludadev\\Passage\\Passage;\nuse Eludadev\\Passage\\Middleware\\PassageAuthMiddleware;\n\n// Example of passage middleware\nRoute::get('authenticatedRoute', function (Request $request) {\n  $passage = new Passage(env('APP_ID'), env('API_KEY'));\n  $userID = $request-\u003euserID;\n})-\u003emiddleware(PassageAuthMiddleware::class);\n```\n\nIf you are not using `eludadev/passage` in a request context, or your application is passing the JWT in a custom way, you can pass the JWT directly to the `validAuthToken` method to perform validation.\n\n```php\n$userID = $passage-\u003evalidAuthToken($token);\n\nif ($userID) {\n  //authenticated\n}\n// otherwise, unauthorized\n```\n\n### App Information\n\nThe Passage SDK provides a way to retrieve information about an app.\n\n```php\nuse Eludadev\\Passage\\Passage;\n\n$passage = new Passage(env('APP_ID'), env('API_KEY'));\n$appInfo = $passage-\u003egetApp();\n```\n\n### User Management\n\nIn addition to authenticating requests, the Passage PHP SDK also provides a way to securely manage your users. These functions require authentication using a Passage API key. API keys can be managed in the [**Passage Console**](https://console.passage.id/).\n\nThe functionality currently available on a user is:\n\n- Get a user's information (including any defined user metadata)\n- Activate or deactivate a user (a deactivated user will not be able to log in)\n- Update a user's information (email address or phone number)\n- Delete a user\n- Create a user\n\n\u003e **Warning**\n\u003e Passage API Keys are sensitive! You should store them securely along with your other application secrets.\n\n\u003cdetails markdown=\"1\"\u003e\n  \u003csummary\u003eGet\u003c/summary\u003e\n  \n```php\nuse Illuminate\\Http\\Request;\n\nuse Eludadev\\Passage\\Passage;\nuse Eludadev\\Passage\\Middleware\\PassageAuthMiddleware;\n\nRoute::get('authenticatedRoute', function (Request $request) {\n$passage = new Passage(env('APP_ID'), env('API_KEY'));\n\n$userID = $request-\u003euserID;\n  $passageUser = $passage-\u003euser-\u003eget($userID);\nreturn $passageUser-\u003eemail;\n})-\u003emiddleware(PassageAuthMiddleware::class);\n\n````\n\n\u003c/details\u003e\n\n\u003cdetails markdown=\"1\"\u003e\n  \u003csummary\u003eActivate/Deactivate\u003c/summary\u003e\n\n```php\nuse Illuminate\\Http\\Request;\n\nuse Eludadev\\Passage\\Passage;\nuse Eludadev\\Passage\\Middleware\\PassageAuthMiddleware;\n\nRoute::get('authenticatedRoute', function (Request $request) {\n  $passage = new Passage(env('APP_ID'), env('API_KEY'));\n  $userID = $request-\u003euserID;\n\n  $deactivatedUser = $passage-\u003euser-\u003edeactivate($userID);\n  $deactivatedUser-\u003eactive; // false\n\n  $activatedUser = $passage-\u003euser-\u003eactivate($userID);\n  $activatedUser-\u003eactive; // true\n})-\u003emiddleware(PassageAuthMiddleware::class);\n```\n\n\u003c/details\u003e\n\n\u003cdetails markdown=\"1\"\u003e\n  \u003csummary\u003eUpdate\u003c/summary\u003e\n\n```php\nuse Illuminate\\Http\\Request;\n\nuse Eludadev\\Passage\\Passage;\nuse Eludadev\\Passage\\Middleware\\PassageAuthMiddleware;\n\nRoute::get('authenticatedRoute', function (Request $request) {\n  $passage = new Passage(env('APP_ID'), env('API_KEY'));\n\n  $userID = $request-\u003euserID;\n  $passageUser = $passage-\u003euser-\u003eupdate($userID, [\n    'email' =\u003e 'testEmail@domain.com',\n    'phone' =\u003e '+15005550006'\n  ]);\n\n  $passageUser-\u003eemail; // testEmail@domain.com\n  $passageUser-\u003ephone; // +15005550006\n})-\u003emiddleware(PassageAuthMiddleware::class);\n```\n\n\u003c/details\u003e\n\n\u003cdetails markdown=\"1\"\u003e\n  \u003csummary\u003eDelete\u003c/summary\u003e\n\n```php\nuse Illuminate\\Http\\Request;\n\nuse Eludadev\\Passage\\Passage;\nuse Eludadev\\Passage\\Middleware\\PassageAuthMiddleware;\n\nRoute::get('authenticatedRoute', function (Request $request) {\n  $passage = new Passage(env('APP_ID'), env('API_KEY'));\n\n  $userID = $request-\u003euserID;\n  $deletedUser = $passage-\u003euser-\u003edelete($userID);\n  $deletedUser; // true\n})-\u003emiddleware(PassageAuthMiddleware::class);\n```\n\n\u003c/details\u003e\n\n\u003cdetails markdown=\"1\"\u003e\n\u003csummary\u003eCreate\u003c/summary\u003e\n\n```php\nuse Eludadev\\Passage\\Passage;\n\n$passage = new Passage(env('APP_ID'), env('API_KEY'));\n\n$newUser1 = $passage-\u003euser-\u003ecreate('testEmail@domain.com');\n$newUser1-\u003eemail; // testEmail@domain.com\n\n$newUser2 = $passage-\u003euser-\u003ecreate(phone:'+15005550006');\n$newUser2-\u003ephone; // +15005550006\n```\n\n\u003c/details\u003e\n\n| Field            | Type                               |\n| ---------------- | ---------------------------------- |\n| id               | string                             |\n| email            | string                             |\n| phone            | string                             |\n| active           | boolean                            |\n| email_verified   | boolean                            |\n| created_at       | DateTime                           |\n| last_login_at    | DateTime                           |\n| webauthn         | boolean                            |\n| user_metadata    | array                              |\n| webauthn_devices | array of strings (e.g. \"Mac OS X\") |\n| recent_events    | array of strings                   |\n\n### User Device Management\n\nThe functionality currently available is:\n\n- List all devices for a user\n- Revoke a particular device from a user\n\n\u003cdetails markdown=\"1\"\u003e\n\u003csummary\u003eList Devices\u003c/summary\u003e\n\n```php\nuse Illuminate\\Http\\Request;\n\nuse Eludadev\\Passage\\Passage;\nuse Eludadev\\Passage\\Middleware\\PassageAuthMiddleware;\n\nRoute::get('authenticatedRoute', function (Request $request) {\n  $passage = new Passage(env('APP_ID'), env('API_KEY'));\n\n  $userID = $request-\u003euserID;\n  $devices = $passage-\u003euser-\u003elistDevices($userID);\n  return $devices;\n})-\u003emiddleware(PassageAuthMiddleware::class);\n```\n\n\u003c/details\u003e\n\n\u003cdetails markdown=\"1\"\u003e\n\u003csummary\u003eRevoke Device\u003c/summary\u003e\n\n```php\nuse Illuminate\\Http\\Request;\n\nuse Eludadev\\Passage\\Passage;\nuse Eludadev\\Passage\\Middleware\\PassageAuthMiddleware;\n\nRoute::get('authenticatedRoute', function (Request $request) {\n  $passage = new Passage(env('APP_ID'), env('API_KEY'));\n\n  $userID = $request-\u003euserID;\n  $success = $passage-\u003euser-\u003erevokeDevice($userID, '\u003cDEVICE_ID\u003e');\n  return $success; // true\n})-\u003emiddleware(PassageAuthMiddleware::class);\n```\n\n\u003c/details\u003e\n\n### Creating Magic Links\n\nThe PHP SDK can be used to generate custom magic links (called \"smart links\") for users, that can be embedded into any content medium. To learn more, see our full guide on [Smart Links](https://docs.passage.id/auth-configuration/embedded-magic-links).\n\n```php\nuse Eludadev\\Passage\\Passage;\n\n$passage = new Passage(env('APP_ID'), env('API_KEY'));\n\n$magicLink = $passage-\u003ecreateMagicLink('newEmail@domain.com', '/custom-path/1234');\n\n// use Magic Link URL\n$magicLink-\u003eurl;\n```\n\n\u003cp align=\"right\"\u003e(\u003ca href=\"#readme-top\"\u003eback to top\u003c/a\u003e)\u003c/p\u003e\n\n\u003c!-- EXAMPLE USAGE --\u003e\n\n## Example Usage\n\nWe built an example full-stack application on React and a PHP backend.\nGet started by opening the following directory: `cd ./examples`\n\n\u003e **Warning**\n\u003e Make sure you have [PHP](https://www.php.net/downloads) and [Composer](https://getcomposer.org/download/) installed on your local machine before continuing with these steps.\n\n![Demo of Passage PHP SDK passwordless authentication with email](./assets/passage-php-sdk.gif)\n\n### Configuring a new Passage Project\n\n![Creating a new Passage project](./assets/console.passage.id_settings_new.png)\n\nCreate a [new Passage project](https://console.passage.id/create/complete).\nMake sure to input `http://localhost:3000` for the domain, and `/dashboard` for the redirect URL.\n\n### Updating an existing Passage project\n\n![Updating an existing Passage project](./assets/console.passage.id_settings_existing.png)\n\nHead over to your project settings.\n\nInput `http://localhost:3000` for the domain, and `/dashboard` for the redirect URL, and `/` for the login URL.\n\n### Running the server\n\n1. Go to the backend directory: `cd ./backend`\n2. Install the dependencies: `composer install`\n3. Copy the environment variables file: `cp .env.example .env`\n4. Replace your [Passage credentials](https://console.passage.id/) in `.env`:\n   ```\n   PASSAGE_APP_ID=\n   PASSAGE_API_KEY=\n   ```\n5. Run the server: `php artisan serve`\n\n### Running the frontend\n\n1. Go to the frontend directory: `cd ./frontend`\n2. Install the dependencies: `yarn`\n3. Copy the environment variables file: `cp EXAMPLE.env .env`\n4. Replace your Passage credentials in `.env`:\n   ```\n   REACT_APP_PASSAGE_APP_ID=\n   ```\n5. Run the server: `yarn start`\n\n### How it works\n\nHere's the code powering the PHP backend:\n\n```php\n// routes/api.php\n\n\u003c?php\n\nuse Eludadev\\Passage\\Errors\\PassageError;\nuse Eludadev\\Passage\\Passage;\nuse Illuminate\\Http\\Request;\nuse Illuminate\\Support\\Facades\\Route;\n\n// This route handles the authentication process for the '/auth' endpoint\n\nRoute::post('/auth', function (Request $request) {\n    try {\n        // Create a new instance of the Passage class using the Passage API credentials from the environment variables\n        $passage = new Passage(env('PASSAGE_APP_ID'), env('PASSAGE_API_KEY'), 'HEADER');\n\n        // Authenticate the request using the Passage API\n        $userId = $passage-\u003eauthenticateRequest($request);\n\n        if ($userId) {\n            // If authentication is successful, retrieve user data using the Passage API\n            $userData = $passage-\u003euser-\u003eget($userId);\n\n            // Determine the identifier based on the user data (email or phone)\n            $identifier = $userData['email'] ? $userData['email'] : $userData['phone'];\n\n            // Return the authentication status and identifier\n            return [\n                'authStatus' =\u003e 'success',\n                'identifier' =\u003e $identifier\n            ];\n        }\n    } catch (PassageError $e) {\n        // Catch any errors that occur during the authentication process and echo the error message\n        echo $e-\u003egetMessage();\n\n        // Return the authentication failure status\n        return [\n            'authStatus' =\u003e 'failure'\n        ];\n    }\n});\n```\n\nFor this particular example, we chose to build the server on the Laravel framework, but the Passage PHP SDK can work on any PHP framework.\n\nThe frontend calls the `localhost:8000/api/auth` URL, which extracts the authentication header, decodes the JWK token, and retrieves the user ID. It then makes calls to the Passage API to retrieve more user information such as email and phone number.\n\nAll of this is done behind the scenes by the PHP SDK, so you don't have to worry about the intricate details.\n\n\u003cp align=\"right\"\u003e(\u003ca href=\"#readme-top\"\u003eback to top\u003c/a\u003e)\u003c/p\u003e\n\n\u003c!-- CONTRIBUTING --\u003e\n\n## Contributing\n\nContributions are what make the open source community such an amazing place to learn, inspire, and create. Any contributions you make are **greatly appreciated**.\n\nIf you have a suggestion that would make this better, please fork the repo and create a pull request. You can also simply open an issue with the tag \"enhancement\".\nDon't forget to give the project a star! Thanks again!\n\n1. Fork the Project\n2. Create your Feature Branch (`git checkout -b feature/AmazingFeature`)\n3. Commit your Changes (`git commit -m 'Add some AmazingFeature'`)\n4. Push to the Branch (`git push origin feature/AmazingFeature`)\n5. Open a Pull Request\n\n\u003cp align=\"right\"\u003e(\u003ca href=\"#readme-top\"\u003eback to top\u003c/a\u003e)\u003c/p\u003e\n\n\u003c!-- LICENSE --\u003e\n\n## License\n\nDistributed under the MIT License. See [`LICENSE`][license-url] for more information.\n\n\u003cp align=\"right\"\u003e(\u003ca href=\"#readme-top\"\u003eback to top\u003c/a\u003e)\u003c/p\u003e\n\n\u003c!-- CONTACT --\u003e\n\n## Contact\n\nYounes Laaroussi - [Telegram](https://t.me/eludadev) - [hello@eluda.dev](mailto:hello@eluda.dev)\n\nProject Link: [https://github.com/eludadev/Passage](https://github.com/eludadev/Passage)\n\n\u003cp align=\"right\"\u003e(\u003ca href=\"#readme-top\"\u003eback to top\u003c/a\u003e)\u003c/p\u003e\n\n\u003c!-- ACKNOWLEDGMENTS --\u003e\n\n## Acknowledgments\n\nMany thanks to 1Password and Hashnode for hosting this amazing hackathon! It was a lot of fun and a fantastic learning experience for me and all the other participants, and hopefully it can happen again! ❤️\n\n\u003cp align=\"right\"\u003e(\u003ca href=\"#readme-top\"\u003eback to top\u003c/a\u003e)\u003c/p\u003e\n\n\u003c!-- MARKDOWN LINKS \u0026 IMAGES --\u003e\n\u003c!-- https://www.markdownguide.org/basic-syntax/#reference-style-links --\u003e\n\n[contributors-shield]: https://img.shields.io/github/contributors/eludadev/Passage.svg?style=for-the-badge\n[contributors-url]: https://github.com/eludadev/Passage/graphs/contributors\n[forks-shield]: https://img.shields.io/github/forks/eludadev/Passage.svg?style=for-the-badge\n[forks-url]: https://github.com/eludadev/Passage/network/members\n[stars-shield]: https://img.shields.io/github/stars/eludadev/Passage.svg?style=for-the-badge\n[stars-url]: https://github.com/eludadev/Passage/stargazers\n[issues-shield]: https://img.shields.io/github/issues/eludadev/Passage.svg?style=for-the-badge\n[issues-url]: https://github.com/eludadev/Passage/issues\n[license-shield]: https://img.shields.io/github/license/eludadev/Passage.svg?style=for-the-badge\n[license-url]: https://github.com/eludadev/Passage/blob/master/LICENSE\n[product-screenshot]: assets/banner.png\n````\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyouneslaaroussi%2Fpassage","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fyouneslaaroussi%2Fpassage","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyouneslaaroussi%2Fpassage/lists"}