https://github.com/logto-io/php
Build authentication and authorization with Logto PHP SDK.
https://github.com/logto-io/php
authentication authorization jwt laravel logto mfa multi-tenant oauth2 oidc php saml sso
Last synced: 5 months ago
JSON representation
Build authentication and authorization with Logto PHP SDK.
- Host: GitHub
- URL: https://github.com/logto-io/php
- Owner: logto-io
- Created: 2023-08-08T06:56:28.000Z (over 2 years ago)
- Default Branch: master
- Last Pushed: 2025-02-07T09:03:35.000Z (11 months ago)
- Last Synced: 2025-03-25T06:23:01.748Z (10 months ago)
- Topics: authentication, authorization, jwt, laravel, logto, mfa, multi-tenant, oauth2, oidc, php, saml, sso
- Language: PHP
- Homepage:
- Size: 105 KB
- Stars: 5
- Watchers: 4
- Forks: 2
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Logto PHP SDK
[][Website]
[][Packagist]
[][Packagist]
[](https://github.com/logto-io/php)
[][Discord]
## Prerequisites
- PHP 8.1 or higher
- A [Logto Cloud](https://logto.io/) account or a self-hosted Logto
- A Logto traditional web application created
If you don't have the Logto application created, please follow the [⚡ Get started](https://docs.logto.io/docs/tutorials/get-started/) guide to create one.
## Installation
```bash
composer require logto/sdk
```
## Tutorial
See [tutorial](./docs/tutorial.md) for a quick start.
## API reference
See [API reference](./docs/api/index.md) for more details.
## Sample code
See [samples](./samples/) directory for example usages.
## Development scripts
### Dev
```bash
composer dev
```
This script will start a dev server at `http://localhost:5000` and use `samples/index.php` as the entry point.
### Test
```bash
composer test
```
### Update API docs
**Prerequisite**
- A `phpDocumentor.phar` in the project root (can be downloaded from [phpDocumentor](https://docs.phpdoc.org/guide/getting-started/installing.html)).
- Command `prettier` is available in the shell (an opinionated [code formatter](https://prettier.io/)), which can be installed with `npm install -g prettier`.
```bash
composer docs
```
This command will generate the API docs in `docs/api` folder and format the files.
## Resources
- [Logto website][Website]
- [Logto documentation](https://docs.logto.io/)
- [Join Discord][Discord]
[Website]: https://logto.io/
[Packagist]: https://packagist.org/packages/logto/sdk
[Discord]: https://discord.gg/vRvwuwgpVX