PHPackages                             chivincent/laravel-kratos - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Authentication &amp; Authorization](/categories/authentication)
4. /
5. chivincent/laravel-kratos

ActiveLibrary[Authentication &amp; Authorization](/categories/authentication)

chivincent/laravel-kratos
=========================

Laravel Kratos integrates authentication features with ory/kratos

v1.2.0(2y ago)5293[1 issues](https://github.com/chivincent/laravel-kratos/issues)[1 PRs](https://github.com/chivincent/laravel-kratos/pulls)MITPHPPHP ^8.1||^8.2

Since Nov 17Pushed 1y ago1 watchersCompare

[ Source](https://github.com/chivincent/laravel-kratos)[ Packagist](https://packagist.org/packages/chivincent/laravel-kratos)[ RSS](/packages/chivincent-laravel-kratos/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (8)Dependencies (5)Versions (11)Used By (0)

Laravel Kratos
==============

[](#laravel-kratos)

[![Testing](https://github.com/chivincent/laravel-kratos/actions/workflows/php.yml/badge.svg)](https://github.com/chivincent/laravel-kratos/actions/workflows/php.yml/badge.svg)

Introduction
------------

[](#introduction)

---

Laravel Kratos integrates authentication features with [ory/kratos](https://github.com/ory/kratos).

Requirements
------------

[](#requirements)

---

- I'm building an API with Laravel.
- I'm not using built-in authentication feature in Laravel, because Kratos has been implemented.
    - I won't use them also in the future.
- The frontend is a separated project
    - The frontend authenticates with Kratos server, and receive a `ory_kratos_session` cookie.
    - The frontend makes requests to the Laravel API, with `ory_kratos_session` cookie.

Install
-------

[](#install)

---

```
composer require chivincent/laravel-kratos
```

Configuration
-------------

[](#configuration)

```
php artisan vendor:publish --provider="Chivincent\LaravelKratos\KratosServiceProvider"
```

- Check the `config/kratos.php`, ensure the endpoint of Kratos service.
- Update `config/auth.php`

```
