Difference between #24 and #25 of
Yii3 - How to start

Revision #25 has been created by rackycz rackycz on Oct 10, 2025, 7:17:37 AM with the memo:

edit
« previous (#24) next (#26) »

Changes

Title unchanged

Yii3 - How to start

Category unchanged

Tutorials

Yii version unchanged

3.0

Tags unchanged

Content changed

[...]
Below I am indicating how to implement "Random Token Authentication". Other options would be:
- JWT (JSON Web Token) .. I see some disadvatages
- OAuth, OAuth2 - too complex for a simple API

Before you start, install dependency:
 
- composer require yiisoft/security
 
 
Let's create a migration for storing the access tokens:

```php
// method up():
$b->createTable('user_token', [
'id' => $b->primaryKey(),
[...]
1 0
2 followers
Viewed: 576 times
Version: 3.0
Category: Tutorials
Tags:
Written by: rackycz rackycz
Last updated by: rackycz rackycz
Created on: Oct 8, 2025
Last updated: 2 days ago
Update Article

Revisions

View all history