PHPackages                             egs33/laravel-datastore-auth - 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. egs33/laravel-datastore-auth

AbandonedArchivedLibrary

egs33/laravel-datastore-auth
============================

1.4.0(5y ago)2713MITPHPPHP ^7.1

Since Oct 18Pushed 5y ago1 watchersCompare

[ Source](https://github.com/egs33/laravel-datastore-auth)[ Packagist](https://packagist.org/packages/egs33/laravel-datastore-auth)[ RSS](/packages/egs33-laravel-datastore-auth/feed)WikiDiscussions master Synced yesterday

READMEChangelog (2)Dependencies (7)Versions (15)Used By (0)

Laravel Datastore Auth
======================

[](#laravel-datastore-auth)

[Laravel authentication](https://laravel.com/docs/master/authentication) using [Google Datastore](https://cloud.google.com/datastore/docs/)

[![CircleCI](https://camo.githubusercontent.com/3906bd2dead6206b4e35ddf59053e3c2093d755a59fb3c5db7cd4898165baedd/68747470733a2f2f636972636c6563692e636f6d2f67682f65677333332f6c61726176656c2d6461746173746f72652d617574682e7376673f7374796c653d736869656c64)](https://circleci.com/gh/egs33/laravel-datastore-auth)[![Latest Stable Version](https://camo.githubusercontent.com/32921a2a174d962dd80fc99f1258f70e1618802b51bddcb81b8befa99fff36ba/68747470733a2f2f706f7365722e707567782e6f72672f65677333332f6c61726176656c2d6461746173746f72652d617574682f762f737461626c65)](https://packagist.org/packages/egs33/laravel-datastore-auth)[![License](https://camo.githubusercontent.com/3982b0e1cab6f994fcf40968fd48c579069bdfd711a124abfd1500f4fde201cd/68747470733a2f2f706f7365722e707567782e6f72672f65677333332f6c61726176656c2d6461746173746f72652d617574682f6c6963656e7365)](https://packagist.org/packages/egs33/laravel-datastore-auth)[![codecov](https://camo.githubusercontent.com/b2323c3f2440abba6f693b2307f90fec61b4eb145a77c79b13ba37df9fa5c4ac/68747470733a2f2f636f6465636f762e696f2f67682f65677333332f6c61726176656c2d6461746173746f72652d617574682f6272616e63682f6d61737465722f67726170682f62616467652e737667)](https://codecov.io/gh/egs33/laravel-datastore-auth)

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

[](#requirements)

- Laravel &gt;= 5.5.0
- Composer

Installation
------------

[](#installation)

```
$ composer require egs33/laravel-datastore-auth
$ php artisan vendor:publish --provider="DatastoreAuth\DatastoreAuthServiceProvider"

```

Quick Start
-----------

[](#quick-start)

Set authentication driver to `datastore`. For example, in `config/auth.php`

```
    'providers' => [
        'users' => [
            'driver' => 'datastore'
        ]
    ],
```

Then it can use same as [Laravel authentication](https://laravel.com/docs/5.7/authentication)

Usage
-----

[](#usage)

### Create user

[](#create-user)

```
$userConfig = [
    'name' => 'hoge',
    'email' => 'hoge@example.com',
    'password' => 'secret'
];
$userProvider = Auth::createUserProvider('users');
$userProvider->create($userConfig);
// or
DatastoreAuth::create($userConfig);
```

### Get Current User etc.

[](#get-current-user-etc)

Use `Auth` facade. Same as [Laravel authentication](https://laravel.com/docs/5.7/authentication)

```
$user = Auth::user(); // get current user
$isLoggedIn = Auth::check();
```

### Update User Data

[](#update-user-data)

```
$user['name'] = 'new-name';
$user['group'] = 'new-group';
$user->save();
```

Config
------

[](#config)

Config file is `config/datastore_auth.php`

Default is

```
[
    'client_config' => [],
    'kind' => 'users',
    'cache' => [
        'isEnabled' => false,
        'keyPrefix' => \DatastoreAuth\DatastoreUserProvider::class . ':',
        'ttl' => null,
    ]
]
```

`client_config` is passed to constructor of `Google\Cloud\Datastore\DatastoreClient`. Please see [document](https://googleapis.github.io/google-cloud-php/#/docs/cloud-datastore/v1.7.0/datastore/datastoreclient) of `google/cloud-datastore`.

`kind` is kind name of user table.

### Cache

[](#cache)

The cache is only used when fetch user by id. Cache storage is specified by `config/cache.php` in your laravel project. `ttl` is expressed in seconds regardless of the laravel version. If it's null, no expire.

When `DatastoreUserProvider#resetPassword`, `DatastoreUserProvider#save`, `DatastoreUserProvider#updateRememberToken`or `User#save` is called, cache is cleared. But you can call `DatastoreUserProvider#deleteCache` if necessary.

###  Health Score

30

—

LowBetter than 64% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity16

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity64

Established project with proven stability

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~53 days

Recently: every ~127 days

Total

14

Last Release

2064d ago

Major Versions

0.1.7 → 1.0.02019-04-25

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/9857221?v=4)[Shuta Eguchi](/maintainers/egs33)[@egs33](https://github.com/egs33)

---

Top Contributors

[![egs33](https://avatars.githubusercontent.com/u/9857221?v=4)](https://github.com/egs33 "egs33 (80 commits)")

---

Tags

cloud-datastorelaravellaravel-5-packagelaravel-6-packagelaravel-authentication

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/egs33-laravel-datastore-auth/health.svg)

```
[![Health](https://phpackages.com/badges/egs33-laravel-datastore-auth/health.svg)](https://phpackages.com/packages/egs33-laravel-datastore-auth)
```

###  Alternatives

[anourvalar/eloquent-serialize

Laravel Query Builder (Eloquent) serialization

11320.2M21](/packages/anourvalar-eloquent-serialize)[namu/wirechat

A Laravel Livewire messaging app for teams with private chats and group conversations.

54324.5k](/packages/namu-wirechat)[statamic-rad-pack/runway

Eloquently manage your database models in Statamic.

135192.6k5](/packages/statamic-rad-pack-runway)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
