Revision #25 was created by rackycz on Oct 10, 2025, 7:17:37 AM.
edit
Content
[...]
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: