{"id":14987424,"url":"https://github.com/michalsn/codeigniter-passage","last_synced_at":"2026-01-04T21:40:34.656Z","repository":{"id":183203188,"uuid":"669075143","full_name":"michalsn/codeigniter-passage","owner":"michalsn","description":"Basic integration for Passage - passwordless authentication powered by passkeys","archived":false,"fork":false,"pushed_at":"2023-09-13T17:37:48.000Z","size":65,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"develop","last_synced_at":"2023-09-14T08:31:18.012Z","etag":null,"topics":["authentication","codeigniter","codeigniter4","passage","passkeys","passwordless","passwordless-authentication","php","php8"],"latest_commit_sha":null,"homepage":"","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/michalsn.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}},"created_at":"2023-07-21T09:28:20.000Z","updated_at":"2023-09-26T02:02:25.890Z","dependencies_parsed_at":null,"dependency_job_id":"22d22702-b111-4160-8f57-f4c14ac2a7c6","html_url":"https://github.com/michalsn/codeigniter-passage","commit_stats":null,"previous_names":["michalsn/codeigniter-passage"],"tags_count":1,"template":null,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/michalsn%2Fcodeigniter-passage","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/michalsn%2Fcodeigniter-passage/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/michalsn%2Fcodeigniter-passage/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/michalsn%2Fcodeigniter-passage/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/michalsn","download_url":"https://codeload.github.com/michalsn/codeigniter-passage/tar.gz/refs/heads/develop","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244852109,"owners_count":20521151,"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":["authentication","codeigniter","codeigniter4","passage","passkeys","passwordless","passwordless-authentication","php","php8"],"created_at":"2024-09-24T14:14:35.689Z","updated_at":"2026-01-04T21:40:34.618Z","avatar_url":"https://github.com/michalsn.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# CodeIgniter Passage\n\nBasic integration for [Passage](https://passage.1password.com/) - passwordless authentication powered by passkeys.\n\n[![PHPUnit](https://github.com/michalsn/codeigniter-passage/actions/workflows/phpunit.yml/badge.svg)](https://github.com/michalsn/codeigniter-passage/actions/workflows/phpunit.yml)\n[![PHPStan](https://github.com/michalsn/codeigniter-passage/actions/workflows/phpstan.yml/badge.svg)](https://github.com/michalsn/codeigniter-passage/actions/workflows/phpstan.yml)\n[![Deptrac](https://github.com/michalsn/codeigniter-passage/actions/workflows/deptrac.yml/badge.svg)](https://github.com/michalsn/codeigniter-passage/actions/workflows/deptrac.yml)\n\n![PHP](https://img.shields.io/badge/PHP-%5E8.0-blue)\n![CodeIgniter](https://img.shields.io/badge/CodeIgniter-%5E4.3-blue)\n\n### Installation\n\n#### Composer\n\n    composer require michalsn/codeigniter-passage\n\n#### Manually\n\nIn the example below we will assume, that files from this project will be located in `app/ThirdParty/passage` directory.\n\nDownload this project and then enable it by editing the `app/Config/Autoload.php` file and adding the `Michalsn\\CodeIgniterPassage` namespace to the `$psr4` array, like in the below example:\n\n```php\n\u003c?php\n\nnamespace Config;\n\nuse CodeIgniter\\Config\\AutoloadConfig;\n\nclass Autoload extends AutoloadConfig\n{\n    // ...\n    public $psr4 = [\n        APP_NAMESPACE =\u003e APPPATH, // For custom app namespace\n        'Config'      =\u003e APPPATH . 'Config',\n        'Michalsn\\CodeIgniterPassage' =\u003e APPPATH . 'ThirdParty/passage/src',\n    ];\n\n    // ...\n```\nAlso add the required helper to the same file under `$files` array:\n\n```php\n    // ...\n    public $files = [\n        APPPATH . 'ThirdParty/passage/src/Common.php',\n    ];\n\n    // ...\n```\n\n### Configuration\n\n- Follow the [quickstart](https://docs.passage.id/getting-started/quickstart)\n- Create an app in the Passage Console\n    - `php spark passage:publish` - to copy config file to the `App` namespace\n    - Fill the config variables or use .env file\n- Add a Passage Element to your frontend\n- You can use `passageStateless` filter as your middleware implementation\n\n### Helper functions\n\n- `passageAppId()` will return your AppId\n- `passageId()` will return your user id (if you're using `passageStateless` filter), you can also set this yourself via: `passageId($userId)`\n\n### Example\n\n```php\n\u003c?php\n\nnamespace App\\Controllers;\n\nuse Michalsn\\CodeIgniterPassage\\Exceptions\\PassageException;\n\nclass Home extends BaseController\n{\n    public function index()\n    {\n        try {\n            $passage = service('passage');\n            $userId = $passage-\u003eauthenticateRequest($this-\u003erequest);\n            $data = ['user' =\u003e $passage-\u003euser-\u003eget($userId)];\n        } catch (PassageException $e) {\n            return $this-\u003eresponse-\u003esetHeader(401)-\u003esetBody('401 Unauthorized');\n        }\n\n        return view('home/index', $data);\n    }\n}\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmichalsn%2Fcodeigniter-passage","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmichalsn%2Fcodeigniter-passage","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmichalsn%2Fcodeigniter-passage/lists"}