{"id":268,"date":"2026-09-28T17:36:01","date_gmt":"2026-09-28T14:36:01","guid":{"rendered":"https:\/\/codeshot.ru\/?p=268"},"modified":"2026-09-28T17:36:01","modified_gmt":"2026-09-28T14:36:01","slug":"laravel-10-oauth2-sanctum","status":"publish","type":"post","link":"https:\/\/codeshot.ru\/?p=268","title":{"rendered":"Laravel 10 OAuth\u20112.0 \u0441 Sanctum: \u043f\u043e\u043b\u043d\u043e\u0435 \u0440\u0443\u043a\u043e\u0432\u043e\u0434\u0441\u0442\u0432\u043e"},"content":{"rendered":"<p>\u0412 \u0441\u043e\u0432\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u043c \u043c\u0438\u0440\u0435 API\u2011\u0430\u0443\u0442\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u0438 \u043a\u043b\u044e\u0447\u0435\u0432\u0443\u044e \u0440\u043e\u043b\u044c \u0438\u0433\u0440\u0430\u0435\u0442 \u043f\u0440\u043e\u0442\u043e\u043a\u043e\u043b OAuth\u20112.0, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043e\u0431\u0435\u0441\u043f\u0435\u0447\u0438\u0432\u0430\u0435\u0442 \u0431\u0435\u0437\u043e\u043f\u0430\u0441\u043d\u044b\u0439 \u0434\u043e\u0441\u0442\u0443\u043f \u043a \u0437\u0430\u0449\u0438\u0449\u0451\u043d\u043d\u044b\u043c \u0440\u0435\u0441\u0443\u0440\u0441\u0430\u043c. \u0412 Laravel 10 \u0438\u043d\u0442\u0435\u0433\u0440\u0430\u0446\u0438\u044f \u044d\u0442\u043e\u0433\u043e \u043f\u0440\u043e\u0442\u043e\u043a\u043e\u043b\u0430 \u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u0441\u044f \u043e\u0441\u043e\u0431\u0435\u043d\u043d\u043e \u0443\u0434\u043e\u0431\u043d\u043e\u0439 \u0431\u043b\u0430\u0433\u043e\u0434\u0430\u0440\u044f \u043f\u0430\u043a\u0435\u0442\u0443 Sanctum, \u0441\u043f\u0435\u0446\u0438\u0430\u043b\u044c\u043d\u043e \u0441\u043e\u0437\u0434\u0430\u043d\u043d\u043e\u043c\u0443 \u0434\u043b\u044f API\u2011\u0430\u0443\u0442\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u0438. \u0412 \u044d\u0442\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0435 \u043c\u044b \u0440\u0430\u0437\u0431\u0435\u0440\u0451\u043c, \u043a\u0430\u043a \u043d\u0430\u0441\u0442\u0440\u043e\u0438\u0442\u044c Sanctum \u0434\u043b\u044f \u0440\u0430\u0431\u043e\u0442\u044b \u0441 OAuth\u20112.0, \u043a\u0430\u043a \u0433\u0435\u043d\u0435\u0440\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0442\u043e\u043a\u0435\u043d\u044b \u0438 \u043a\u0430\u043a \u043a\u043e\u0440\u0440\u0435\u043a\u0442\u043d\u043e \u0438\u0445 \u043e\u0431\u043d\u043e\u0432\u043b\u044f\u0442\u044c, \u0447\u0442\u043e\u0431\u044b \u0432\u0430\u0448 \u0441\u0435\u0440\u0432\u0438\u0441 \u043e\u0441\u0442\u0430\u0432\u0430\u043b\u0441\u044f \u0437\u0430\u0449\u0438\u0449\u0451\u043d\u043d\u044b\u043c \u0438 \u043c\u0430\u0441\u0448\u0442\u0430\u0431\u0438\u0440\u0443\u0435\u043c\u044b\u043c.<\/p>\n<h2>\u0420\u0430\u0437\u0431\u043e\u0440 \u0437\u0430\u0434\u0430\u0447\u0438<\/h2>\n<p>\u0412\u044b \u0445\u043e\u0442\u0438\u0442\u0435, \u0447\u0442\u043e\u0431\u044b \u0432\u0430\u0448 Laravel\u2011\u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u043c\u043e\u0433\u043b\u043e \u0432\u044b\u0434\u0430\u0432\u0430\u0442\u044c \u0442\u043e\u043a\u0435\u043d\u044b, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043a\u043b\u0438\u0435\u043d\u0442\u044b (\u0432\u0435\u0431\u2011\u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f, \u043c\u043e\u0431\u0438\u043b\u044c\u043d\u044b\u0435 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f, \u0441\u0442\u043e\u0440\u043e\u043d\u043d\u0438\u0435 \u0441\u0435\u0440\u0432\u0438\u0441\u044b) \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0442 \u0434\u043b\u044f \u0434\u043e\u0441\u0442\u0443\u043f\u0430 \u043a \u0437\u0430\u0449\u0438\u0449\u0451\u043d\u043d\u044b\u043c \u044d\u043d\u0434\u043f\u043e\u0438\u043d\u0442\u0430\u043c. \u0414\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e:<\/p>\n<ol>\n<li>\u0443\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u044c Sanctum \u0438 \u043d\u0430\u0441\u0442\u0440\u043e\u0438\u0442\u044c \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u044e;<\/li>\n<li>\u0441\u043e\u0437\u0434\u0430\u0442\u044c \u043a\u043b\u0438\u0435\u043d\u0442\u2011\u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u0432 \u0431\u0430\u0437\u0435 \u0434\u0430\u043d\u043d\u044b\u0445;<\/li>\n<li>\u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u0442\u044c \u044d\u043d\u0434\u043f\u043e\u0438\u043d\u0442\u044b \u0434\u043b\u044f \u0432\u044b\u0434\u0430\u0447\u0438 \u0442\u043e\u043a\u0435\u043d\u043e\u0432;<\/li>\n<li>\u043e\u0431\u0435\u0441\u043f\u0435\u0447\u0438\u0442\u044c \u043c\u0435\u0445\u0430\u043d\u0438\u0437\u043c \u043e\u0431\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u044f \u0442\u043e\u043a\u0435\u043d\u043e\u0432 (refresh token) \u0434\u043b\u044f \u043f\u0440\u043e\u0434\u043b\u0435\u043d\u0438\u044f \u0441\u0440\u043e\u043a\u0430 \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044f.<\/ol>\n<h2>\u041f\u043e\u0448\u0430\u0433\u043e\u0432\u043e\u0435 \u0440\u0435\u0448\u0435\u043d\u0438\u0435<\/h2>\n<p>\u0428\u0430\u0433 1 \u2013 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0430 Sanctum. \u0417\u0430\u043f\u0443\u0441\u0442\u0438\u0442\u0435 composer require laravel\/sanctum, \u0437\u0430\u0442\u0435\u043c \u043f\u0440\u043e\u0432\u0435\u0440\u044c\u0442\u0435 \u043c\u0438\u0433\u0440\u0430\u0446\u0438\u0438 \u0438 \u0441\u0433\u0435\u043d\u0435\u0440\u0438\u0440\u0443\u0439\u0442\u0435 \u0442\u0430\u0431\u043b\u0438\u0446\u0443 clients. \u0428\u0430\u0433 2 \u2013 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u0442\u0435 middleware api, \u0434\u043e\u0431\u0430\u0432\u0438\u0432 IlluminateRoutingMiddlewareSubstituteBindings::class \u0438 LaravelSanctumHttpMiddlewareEnsureFrontendRequestsAreStateful::class, \u0447\u0442\u043e\u0431\u044b Sanctum \u0440\u0430\u0441\u043f\u043e\u0437\u043d\u0430\u0432\u0430\u043b \u0437\u0430\u043f\u0440\u043e\u0441\u044b \u043e\u0442 SPA. \u0428\u0430\u0433 3 \u2013 \u0441\u043e\u0437\u0434\u0430\u0439\u0442\u0435 \u0442\u0430\u0431\u043b\u0438\u0446\u0443 personal_access_tokens \u0438 \u0443\u0431\u0435\u0434\u0438\u0442\u0435\u0441\u044c, \u0447\u0442\u043e \u043e\u043d\u0430 \u0445\u0440\u0430\u043d\u0438\u0442 \u0442\u043e\u043a\u0435\u043d\u044b \u0432 \u0432\u0438\u0434\u0435 \u0445\u0435\u0448\u0435\u0439. \u0428\u0430\u0433 4 \u2013 \u0440\u0435\u0430\u043b\u0438\u0437\u0443\u0439\u0442\u0435 \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u043b\u0435\u0440, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043f\u0440\u0438 POST \/oauth\/token \u043f\u0440\u0438\u043d\u0438\u043c\u0430\u0435\u0442 client_id, client_secret, grant_type, scope \u0438 \u0432\u044b\u0434\u0430\u0451\u0442 access_token \u0438 optional refresh_token. \u0428\u0430\u0433 5 \u2013 \u0434\u043e\u0431\u0430\u0432\u044c\u0442\u0435 \u044d\u043d\u0434\u043f\u043e\u0438\u043d\u0442 \/oauth\/token\/refresh, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043f\u0440\u0438\u043d\u0438\u043c\u0430\u0435\u0442 refresh_token, \u0432\u0430\u043b\u0438\u0434\u0438\u0440\u0443\u0435\u0442 \u0435\u0433\u043e, \u0433\u0435\u043d\u0435\u0440\u0438\u0440\u0443\u0435\u0442 \u043d\u043e\u0432\u044b\u0439 access_token \u0438 \u043e\u0431\u043d\u043e\u0432\u043b\u044f\u0435\u0442 \u0441\u0440\u043e\u043a \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044f. \u0428\u0430\u0433 6 \u2013 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u0442\u0435 middleware auth:sanctum \u043d\u0430 \u0437\u0430\u0449\u0438\u0449\u0451\u043d\u043d\u044b\u0445 \u043c\u0430\u0440\u0448\u0440\u0443\u0442\u0430\u0445, \u0447\u0442\u043e\u0431\u044b \u043e\u043d\u0438 \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u043b\u0438 \u043d\u0430\u043b\u0438\u0447\u0438\u0435 \u0432\u0430\u043b\u0438\u0434\u043d\u043e\u0433\u043e access_token. \u0428\u0430\u0433 7 \u2013 \u043f\u0440\u043e\u0442\u0435\u0441\u0442\u0438\u0440\u0443\u0439\u0442\u0435 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e Postman \u0438\u043b\u0438 cURL, \u0443\u0431\u0435\u0434\u0438\u0432\u0448\u0438\u0441\u044c, \u0447\u0442\u043e \u0442\u043e\u043a\u0435\u043d \u0432\u044b\u0434\u0430\u0451\u0442\u0441\u044f, \u0441\u043e\u0445\u0440\u0430\u043d\u044f\u0435\u0442\u0441\u044f \u0438 \u043e\u0431\u043d\u043e\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u043f\u043e \u043c\u0435\u0440\u0435 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e\u0441\u0442\u0438. \u041f\u0440\u0438 \u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u043e\u0439 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0435 Sanctum \u043e\u0431\u0435\u0441\u043f\u0435\u0447\u0438\u0432\u0430\u0435\u0442 \u043f\u0440\u043e\u0441\u0442\u0443\u044e \u0438 \u043d\u0430\u0434\u0451\u0436\u043d\u0443\u044e OAuth\u20112.0 \u0430\u0443\u0442\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u044e, \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u044f \u0431\u044b\u0441\u0442\u0440\u043e \u0438 \u0431\u0435\u0437\u043e\u043f\u0430\u0441\u043d\u043e \u043c\u0430\u0441\u0448\u0442\u0430\u0431\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0432\u0430\u0448 API.<\/p>\n<h2>\u0420\u0430\u0431\u043e\u0447\u0438\u0439 \u043a\u043e\u0434<\/h2>\n<pre><code class=\"language-php\">get('\/user', function () {\n    return auth()-&gt;user();\n});\n\n\/\/ app\/Http\/Controllers\/AuthController.php\nnamespace AppHttpControllers;\nuse AppModelsUser;\nuse IlluminateHttpRequest;\nuse IlluminateSupportFacadesHash;\n\nclass AuthController extends Controller\n{\n    public function login(Request $request)\n    {\n        $request-&gt;validate([\n            'email' =&gt; 'required|email',\n            'password' =&gt; 'required',\n        ]);\n\n        $user = User::where('email', $request-&gt;email)-&gt;first();\n        if (! $user || ! Hash::check($request-&gt;password, $user-&gt;password)) {\n            return response()-&gt;json(['message' =&gt; 'Unauthorized'], 401);\n        }\n\n        \/\/ \u0421\u043e\u0437\u0434\u0430\u0451\u043c \u0442\u043e\u043a\u0435\u043d \u0441 \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0435\u043d\u0438\u0435\u043c (scopes) \u0435\u0441\u043b\u0438 \u043d\u0443\u0436\u043d\u043e\n        $token = $user-&gt;createToken('api-token', ['*'])-&gt;plainTextToken;\n        return response()-&gt;json(['token' =&gt; $token]);\n    }\n}\n<\/code><\/pre>\n<h2>\u0422\u0438\u043f\u0438\u0447\u043d\u044b\u0435 \u043e\u0448\u0438\u0431\u043a\u0438<\/h2>\n<ul>\n<li>\u041d\u0435 \u0432\u043a\u043b\u044e\u0447\u0451\u043d middleware &#8216;sanctum&#8217; \u0432 api.php \u2013 \u0431\u0435\u0437 \u043d\u0435\u0433\u043e \u0442\u043e\u043a\u0435\u043d \u043d\u0435 \u0431\u0443\u0434\u0435\u0442 \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u0442\u044c\u0441\u044f.<\/li>\n<li>\u041e\u0442\u0441\u0443\u0442\u0441\u0442\u0432\u0443\u0435\u0442 \u043f\u0430\u043a\u0435\u0442 sanctum: composer require laravel\/sanctum \u0438 \u043f\u0443\u0431\u043b\u0438\u043a\u0430\u0446\u0438\u044f \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u0438.<\/li>\n<li>\u041d\u0435\u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u0430\u044f \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430 guards \u0432 config\/auth.php \u2013 \u0443\u0431\u0435\u0434\u0438\u0442\u0435\u0441\u044c, \u0447\u0442\u043e guard &#8216;sanctum&#8217; \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442 driver &#8216;sanctum&#8217;.<\/li>\n<li>\u041a\u0435\u0448\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u0438 \u0431\u0435\u0437 \u043e\u0447\u0438\u0441\u0442\u043a\u0438: php artisan config:clear \u043f\u043e\u0441\u043b\u0435 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u0439.<\/li>\n<\/ul>\n<h2>FAQ<\/h2>\n<h3>1. \u041a\u0430\u043a \u043e\u0431\u043d\u043e\u0432\u0438\u0442\u044c \u0442\u043e\u043a\u0435\u043d?<\/h3>\n<p>\u0412 Sanctum \u043d\u0435\u0442 \u0432\u0441\u0442\u0440\u043e\u0435\u043d\u043d\u043e\u0433\u043e refresh\u2011token. \u041d\u0443\u0436\u043d\u043e \u0432\u0440\u0443\u0447\u043d\u0443\u044e \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u043d\u043e\u0432\u044b\u0439 \u0442\u043e\u043a\u0435\u043d \u0438 \u0443\u0434\u0430\u043b\u0438\u0442\u044c \u0441\u0442\u0430\u0440\u044b\u0439: $user-&gt;tokens()-&gt;where(&#8216;id&#8217;, $oldId)-&gt;delete();<\/p>\n<h3>2. \u041c\u043e\u0436\u043d\u043e \u043b\u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c OAuth2 \u0432\u043c\u0435\u0441\u0442\u0435 \u0441 Sanctum?<\/h3>\n<p>\u0414\u0430, Sanctum \u043c\u043e\u0436\u0435\u0442 \u0445\u0440\u0430\u043d\u0438\u0442\u044c personal access tokens, \u0430 OAuth2 \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u0442\u044c \u0447\u0435\u0440\u0435\u0437 \u043f\u0430\u043a\u0435\u0442 Laravel Passport. \u041d\u043e \u0434\u043b\u044f \u043f\u0440\u043e\u0441\u0442\u044b\u0445 API \u043b\u0443\u0447\u0448\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0442\u043e\u043b\u044c\u043a\u043e \u043e\u0434\u0438\u043d.<\/p>\n<h3>3. \u041f\u043e\u0447\u0435\u043c\u0443 \u043f\u0440\u0438 \u0437\u0430\u043f\u0440\u043e\u0441\u0435 401, \u043d\u043e \u0442\u043e\u043a\u0435\u043d \u0432\u044b\u0433\u043b\u044f\u0434\u0438\u0442 \u043a\u043e\u0440\u0440\u0435\u043a\u0442\u043d\u044b\u043c?<\/h3>\n<p>\u041f\u0440\u043e\u0432\u0435\u0440\u044c\u0442\u0435, \u0447\u0442\u043e \u0442\u043e\u043a\u0435\u043d \u043f\u0435\u0440\u0435\u0434\u0430\u0451\u0442\u0441\u044f \u0432 \u0437\u0430\u0433\u043e\u043b\u043e\u0432\u043a\u0435 Authorization: Bearer {token}. \u0422\u0430\u043a\u0436\u0435 \u0443\u0431\u0435\u0434\u0438\u0442\u0435\u0441\u044c, \u0447\u0442\u043e \u0442\u043e\u043a\u0435\u043d \u043d\u0435 \u043f\u0440\u043e\u0441\u0440\u043e\u0447\u0435\u043d \u0438 \u043d\u0435 \u0443\u0434\u0430\u043b\u0451\u043d.<\/p>\n<h2>\u0417\u0430\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435 \u0438 \u0447\u0435\u043a\u2011\u043b\u0438\u0441\u0442<\/h2>\n<ul>\n<li>\u0423\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d Laravel 10 \u0438 \u043f\u0430\u043a\u0435\u0442 sanctum.<\/li>\n<li>\u041f\u0443\u0431\u043b\u0438\u043a\u0443\u0435\u0442\u0441\u044f \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u044f \u0438 \u043c\u0438\u0433\u0440\u0430\u0446\u0438\u0438.<\/li>\n<li>\u0412 routes\/api.php \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u044b \u043c\u0430\u0440\u0448\u0440\u0443\u0442\u044b \u0438 middleware sanctum.<\/li>\n<li>\u0412 \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u043b\u0435\u0440\u0435 \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u043d login \u0438 \u0432\u044b\u0434\u0430\u0447\u0430 \u0442\u043e\u043a\u0435\u043d\u0430.<\/li>\n<li>\u041f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u0442\u0441\u044f \u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u043e\u0441\u0442\u044c guards \u0438 \u043a\u0435\u0448\u0430.<\/li>\n<li>\u0422\u0435\u0441\u0442\u0438\u0440\u0443\u0435\u0442\u0441\u044f \u0437\u0430\u043f\u0440\u043e\u0441 \u0441 \u0442\u043e\u043a\u0435\u043d\u043e\u043c \u0447\u0435\u0440\u0435\u0437 Postman.<\/li>\n<\/ul>\n","protected":false},"excerpt":{"rendered":"<p>\u0423\u0437\u043d\u0430\u0439\u0442\u0435, \u043a\u0430\u043a \u043d\u0430\u0441\u0442\u0440\u043e\u0438\u0442\u044c OAuth\u20112.0 \u0430\u0443\u0442\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u044e \u0432 Laravel 10 \u0441 Sanctum, \u0441\u043e\u0437\u0434\u0430\u0432\u0430\u0442\u044c \u0442\u043e\u043a\u0435\u043d\u044b \u0438 \u043e\u0431\u043d\u043e\u0432\u043b\u044f\u0442\u044c \u0438\u0445. \u0411\u044b\u0441\u0442\u0440\u044b\u0439 \u0441\u0442\u0430\u0440\u0442, \u043f\u043e\u0434\u0440\u043e\u0431\u043d\u044b\u0435 \u0448\u0430\u0433\u0438, \u0440\u0435\u0430\u043b\u044c\u043d\u044b\u0435 \u043f\u0440\u0438\u043c\u0435\u0440\u044b. \u041d\u0430\u0447\u043d\u0438\u0442\u0435 \u043f\u0440\u044f\u043c\u043e \u0441\u0435\u0439\u0447\u0430\u0441!<\/p>\n","protected":false},"author":2,"featured_media":269,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[41,43,1],"tags":[129,130,131],"class_list":["post-268","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-api","category-coding","category-about-all","tag-laravel","tag-oauth2","tag-sanctum"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v25.7 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Laravel 10 OAuth\u20112.0 \u0441 Sanctum: \u043f\u043e\u043b\u043d\u043e\u0435 \u0440\u0443\u043a\u043e\u0432\u043e\u0434\u0441\u0442\u0432\u043e - CODESHOT - \u041f\u043e\u043b\u0435\u0437\u043d\u044b\u0439 \u043a\u043e\u0434<\/title>\n<meta name=\"description\" content=\"\u0423\u0437\u043d\u0430\u0439\u0442\u0435, \u043a\u0430\u043a \u043d\u0430\u0441\u0442\u0440\u043e\u0438\u0442\u044c OAuth\u20112.0 \u0430\u0443\u0442\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u044e \u0432 Laravel 10 \u0441 Sanctum, \u0441\u043e\u0437\u0434\u0430\u0432\u0430\u0442\u044c \u0442\u043e\u043a\u0435\u043d\u044b \u0438 \u043e\u0431\u043d\u043e\u0432\u043b\u044f\u0442\u044c \u0438\u0445. \u0411\u044b\u0441\u0442\u0440\u044b\u0439 \u0441\u0442\u0430\u0440\u0442, \u043f\u043e\u0434\u0440\u043e\u0431\u043d\u044b\u0435 \u0448\u0430\u0433\u0438, \u0440\u0435\u0430\u043b\u044c\u043d\u044b\u0435 \u043f\u0440\u0438\u043c\u0435\u0440\u044b. \u041d\u0430\u0447\u043d\u0438\u0442\u0435 \u043f\u0440\u044f\u043c\u043e \u0441\u0435\u0439\u0447\u0430\u0441!\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/codeshot.ru\/?p=268\" \/>\n<meta property=\"og:locale\" content=\"ru_RU\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Laravel 10 OAuth\u20112.0 \u0441 Sanctum: \u043f\u043e\u043b\u043d\u043e\u0435 \u0440\u0443\u043a\u043e\u0432\u043e\u0434\u0441\u0442\u0432\u043e - CODESHOT - \u041f\u043e\u043b\u0435\u0437\u043d\u044b\u0439 \u043a\u043e\u0434\" \/>\n<meta property=\"og:description\" content=\"\u0423\u0437\u043d\u0430\u0439\u0442\u0435, \u043a\u0430\u043a \u043d\u0430\u0441\u0442\u0440\u043e\u0438\u0442\u044c OAuth\u20112.0 \u0430\u0443\u0442\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u044e \u0432 Laravel 10 \u0441 Sanctum, \u0441\u043e\u0437\u0434\u0430\u0432\u0430\u0442\u044c \u0442\u043e\u043a\u0435\u043d\u044b \u0438 \u043e\u0431\u043d\u043e\u0432\u043b\u044f\u0442\u044c \u0438\u0445. \u0411\u044b\u0441\u0442\u0440\u044b\u0439 \u0441\u0442\u0430\u0440\u0442, \u043f\u043e\u0434\u0440\u043e\u0431\u043d\u044b\u0435 \u0448\u0430\u0433\u0438, \u0440\u0435\u0430\u043b\u044c\u043d\u044b\u0435 \u043f\u0440\u0438\u043c\u0435\u0440\u044b. \u041d\u0430\u0447\u043d\u0438\u0442\u0435 \u043f\u0440\u044f\u043c\u043e \u0441\u0435\u0439\u0447\u0430\u0441!\" \/>\n<meta property=\"og:url\" content=\"https:\/\/codeshot.ru\/?p=268\" \/>\n<meta property=\"og:site_name\" content=\"CODESHOT - \u041f\u043e\u043b\u0435\u0437\u043d\u044b\u0439 \u043a\u043e\u0434\" \/>\n<meta property=\"article:published_time\" content=\"2026-09-28T14:36:01+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/codeshot.ru\/wp-content\/uploads\/2026\/09\/laravel-10-oauth-2-0-d181-sanctum-d0bfd0bed0bbd0bdd0bed0b5-d180d183d0bad0bed0b2d0bed0b4d181d182d0b2d0be.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"1024\" \/>\n\t<meta property=\"og:image:height\" content=\"576\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"author\" content=\"\u0410\u043d\u0442\u043e\u043d \u0418\u0432\u0430\u043d\u043e\u0432\u0438\u0447\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"\u041d\u0430\u043f\u0438\u0441\u0430\u043d\u043e \u0430\u0432\u0442\u043e\u0440\u043e\u043c\" \/>\n\t<meta name=\"twitter:data1\" content=\"\u0410\u043d\u0442\u043e\u043d \u0418\u0432\u0430\u043d\u043e\u0432\u0438\u0447\" \/>\n\t<meta name=\"twitter:label2\" content=\"\u041f\u0440\u0438\u043c\u0435\u0440\u043d\u043e\u0435 \u0432\u0440\u0435\u043c\u044f \u0434\u043b\u044f \u0447\u0442\u0435\u043d\u0438\u044f\" \/>\n\t<meta name=\"twitter:data2\" content=\"1 \u043c\u0438\u043d\u0443\u0442\u0430\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/codeshot.ru\/?p=268#article\",\"isPartOf\":{\"@id\":\"https:\/\/codeshot.ru\/?p=268\"},\"author\":{\"name\":\"\u0410\u043d\u0442\u043e\u043d \u0418\u0432\u0430\u043d\u043e\u0432\u0438\u0447\",\"@id\":\"https:\/\/codeshot.ru\/#\/schema\/person\/ae4675b745dd574854e37ce5240ecace\"},\"headline\":\"Laravel 10 OAuth\u20112.0 \u0441 Sanctum: \u043f\u043e\u043b\u043d\u043e\u0435 \u0440\u0443\u043a\u043e\u0432\u043e\u0434\u0441\u0442\u0432\u043e\",\"datePublished\":\"2026-09-28T14:36:01+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/codeshot.ru\/?p=268\"},\"wordCount\":439,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\/\/codeshot.ru\/#organization\"},\"image\":{\"@id\":\"https:\/\/codeshot.ru\/?p=268#primaryimage\"},\"thumbnailUrl\":\"https:\/\/codeshot.ru\/wp-content\/uploads\/2026\/09\/laravel-10-oauth-2-0-d181-sanctum-d0bfd0bed0bbd0bdd0bed0b5-d180d183d0bad0bed0b2d0bed0b4d181d182d0b2d0be.jpg\",\"keywords\":[\"laravel\",\"oauth2\",\"sanctum\"],\"articleSection\":[\"API\",\"Coding\",\"\u041e\u0431\u043e \u0432\u0441\u0451\u043c\"],\"inLanguage\":\"ru-RU\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/codeshot.ru\/?p=268#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/codeshot.ru\/?p=268\",\"url\":\"https:\/\/codeshot.ru\/?p=268\",\"name\":\"Laravel 10 OAuth\u20112.0 \u0441 Sanctum: \u043f\u043e\u043b\u043d\u043e\u0435 \u0440\u0443\u043a\u043e\u0432\u043e\u0434\u0441\u0442\u0432\u043e - CODESHOT - \u041f\u043e\u043b\u0435\u0437\u043d\u044b\u0439 \u043a\u043e\u0434\",\"isPartOf\":{\"@id\":\"https:\/\/codeshot.ru\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/codeshot.ru\/?p=268#primaryimage\"},\"image\":{\"@id\":\"https:\/\/codeshot.ru\/?p=268#primaryimage\"},\"thumbnailUrl\":\"https:\/\/codeshot.ru\/wp-content\/uploads\/2026\/09\/laravel-10-oauth-2-0-d181-sanctum-d0bfd0bed0bbd0bdd0bed0b5-d180d183d0bad0bed0b2d0bed0b4d181d182d0b2d0be.jpg\",\"datePublished\":\"2026-09-28T14:36:01+00:00\",\"description\":\"\u0423\u0437\u043d\u0430\u0439\u0442\u0435, \u043a\u0430\u043a \u043d\u0430\u0441\u0442\u0440\u043e\u0438\u0442\u044c OAuth\u20112.0 \u0430\u0443\u0442\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u044e \u0432 Laravel 10 \u0441 Sanctum, \u0441\u043e\u0437\u0434\u0430\u0432\u0430\u0442\u044c \u0442\u043e\u043a\u0435\u043d\u044b \u0438 \u043e\u0431\u043d\u043e\u0432\u043b\u044f\u0442\u044c \u0438\u0445. \u0411\u044b\u0441\u0442\u0440\u044b\u0439 \u0441\u0442\u0430\u0440\u0442, \u043f\u043e\u0434\u0440\u043e\u0431\u043d\u044b\u0435 \u0448\u0430\u0433\u0438, \u0440\u0435\u0430\u043b\u044c\u043d\u044b\u0435 \u043f\u0440\u0438\u043c\u0435\u0440\u044b. \u041d\u0430\u0447\u043d\u0438\u0442\u0435 \u043f\u0440\u044f\u043c\u043e \u0441\u0435\u0439\u0447\u0430\u0441!\",\"breadcrumb\":{\"@id\":\"https:\/\/codeshot.ru\/?p=268#breadcrumb\"},\"inLanguage\":\"ru-RU\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/codeshot.ru\/?p=268\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"ru-RU\",\"@id\":\"https:\/\/codeshot.ru\/?p=268#primaryimage\",\"url\":\"https:\/\/codeshot.ru\/wp-content\/uploads\/2026\/09\/laravel-10-oauth-2-0-d181-sanctum-d0bfd0bed0bbd0bdd0bed0b5-d180d183d0bad0bed0b2d0bed0b4d181d182d0b2d0be.jpg\",\"contentUrl\":\"https:\/\/codeshot.ru\/wp-content\/uploads\/2026\/09\/laravel-10-oauth-2-0-d181-sanctum-d0bfd0bed0bbd0bdd0bed0b5-d180d183d0bad0bed0b2d0bed0b4d181d182d0b2d0be.jpg\",\"width\":1024,\"height\":576},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/codeshot.ru\/?p=268#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"\u0413\u043b\u0430\u0432\u043d\u0430\u044f \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0430\",\"item\":\"https:\/\/codeshot.ru\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Laravel 10 OAuth\u20112.0 \u0441 Sanctum: \u043f\u043e\u043b\u043d\u043e\u0435 \u0440\u0443\u043a\u043e\u0432\u043e\u0434\u0441\u0442\u0432\u043e\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/codeshot.ru\/#website\",\"url\":\"https:\/\/codeshot.ru\/\",\"name\":\"CODESHOT - \u041f\u043e\u043b\u0435\u0437\u043d\u044b\u0439 \u043a\u043e\u0434\",\"description\":\"\u0420\u0430\u0437\u043b\u0438\u0447\u043d\u044b\u0439 \u043a\u043e\u0434 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c, \u0441\u0430\u0439\u0442\u043e\u0432, \u043c\u043e\u0431\u0438\u043b\u043e\u043a \u0438 \u0441\u043a\u0440\u0438\u043f\u0442\u043e\u0432!\",\"publisher\":{\"@id\":\"https:\/\/codeshot.ru\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/codeshot.ru\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"ru-RU\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/codeshot.ru\/#organization\",\"name\":\"CODESHOT - \u041f\u043e\u043b\u0435\u0437\u043d\u044b\u0439 \u043a\u043e\u0434\",\"url\":\"https:\/\/codeshot.ru\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"ru-RU\",\"@id\":\"https:\/\/codeshot.ru\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/codeshot.ru\/wp-content\/uploads\/2025\/04\/logo-agency.png\",\"contentUrl\":\"https:\/\/codeshot.ru\/wp-content\/uploads\/2025\/04\/logo-agency.png\",\"width\":200,\"height\":200,\"caption\":\"CODESHOT - \u041f\u043e\u043b\u0435\u0437\u043d\u044b\u0439 \u043a\u043e\u0434\"},\"image\":{\"@id\":\"https:\/\/codeshot.ru\/#\/schema\/logo\/image\/\"}},{\"@type\":\"Person\",\"@id\":\"https:\/\/codeshot.ru\/#\/schema\/person\/ae4675b745dd574854e37ce5240ecace\",\"name\":\"\u0410\u043d\u0442\u043e\u043d \u0418\u0432\u0430\u043d\u043e\u0432\u0438\u0447\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"ru-RU\",\"@id\":\"https:\/\/codeshot.ru\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/12cc23cc07df127aea83020242b93fad313980fe7ec7ae6915395c9e002a891f?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/12cc23cc07df127aea83020242b93fad313980fe7ec7ae6915395c9e002a891f?s=96&d=mm&r=g\",\"caption\":\"\u0410\u043d\u0442\u043e\u043d \u0418\u0432\u0430\u043d\u043e\u0432\u0438\u0447\"},\"url\":\"https:\/\/codeshot.ru\/?author=2\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Laravel 10 OAuth\u20112.0 \u0441 Sanctum: \u043f\u043e\u043b\u043d\u043e\u0435 \u0440\u0443\u043a\u043e\u0432\u043e\u0434\u0441\u0442\u0432\u043e - CODESHOT - \u041f\u043e\u043b\u0435\u0437\u043d\u044b\u0439 \u043a\u043e\u0434","description":"\u0423\u0437\u043d\u0430\u0439\u0442\u0435, \u043a\u0430\u043a \u043d\u0430\u0441\u0442\u0440\u043e\u0438\u0442\u044c OAuth\u20112.0 \u0430\u0443\u0442\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u044e \u0432 Laravel 10 \u0441 Sanctum, \u0441\u043e\u0437\u0434\u0430\u0432\u0430\u0442\u044c \u0442\u043e\u043a\u0435\u043d\u044b \u0438 \u043e\u0431\u043d\u043e\u0432\u043b\u044f\u0442\u044c \u0438\u0445. \u0411\u044b\u0441\u0442\u0440\u044b\u0439 \u0441\u0442\u0430\u0440\u0442, \u043f\u043e\u0434\u0440\u043e\u0431\u043d\u044b\u0435 \u0448\u0430\u0433\u0438, \u0440\u0435\u0430\u043b\u044c\u043d\u044b\u0435 \u043f\u0440\u0438\u043c\u0435\u0440\u044b. \u041d\u0430\u0447\u043d\u0438\u0442\u0435 \u043f\u0440\u044f\u043c\u043e \u0441\u0435\u0439\u0447\u0430\u0441!","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/codeshot.ru\/?p=268","og_locale":"ru_RU","og_type":"article","og_title":"Laravel 10 OAuth\u20112.0 \u0441 Sanctum: \u043f\u043e\u043b\u043d\u043e\u0435 \u0440\u0443\u043a\u043e\u0432\u043e\u0434\u0441\u0442\u0432\u043e - CODESHOT - \u041f\u043e\u043b\u0435\u0437\u043d\u044b\u0439 \u043a\u043e\u0434","og_description":"\u0423\u0437\u043d\u0430\u0439\u0442\u0435, \u043a\u0430\u043a \u043d\u0430\u0441\u0442\u0440\u043e\u0438\u0442\u044c OAuth\u20112.0 \u0430\u0443\u0442\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u044e \u0432 Laravel 10 \u0441 Sanctum, \u0441\u043e\u0437\u0434\u0430\u0432\u0430\u0442\u044c \u0442\u043e\u043a\u0435\u043d\u044b \u0438 \u043e\u0431\u043d\u043e\u0432\u043b\u044f\u0442\u044c \u0438\u0445. \u0411\u044b\u0441\u0442\u0440\u044b\u0439 \u0441\u0442\u0430\u0440\u0442, \u043f\u043e\u0434\u0440\u043e\u0431\u043d\u044b\u0435 \u0448\u0430\u0433\u0438, \u0440\u0435\u0430\u043b\u044c\u043d\u044b\u0435 \u043f\u0440\u0438\u043c\u0435\u0440\u044b. \u041d\u0430\u0447\u043d\u0438\u0442\u0435 \u043f\u0440\u044f\u043c\u043e \u0441\u0435\u0439\u0447\u0430\u0441!","og_url":"https:\/\/codeshot.ru\/?p=268","og_site_name":"CODESHOT - \u041f\u043e\u043b\u0435\u0437\u043d\u044b\u0439 \u043a\u043e\u0434","article_published_time":"2026-09-28T14:36:01+00:00","og_image":[{"width":1024,"height":576,"url":"https:\/\/codeshot.ru\/wp-content\/uploads\/2026\/09\/laravel-10-oauth-2-0-d181-sanctum-d0bfd0bed0bbd0bdd0bed0b5-d180d183d0bad0bed0b2d0bed0b4d181d182d0b2d0be.jpg","type":"image\/jpeg"}],"author":"\u0410\u043d\u0442\u043e\u043d \u0418\u0432\u0430\u043d\u043e\u0432\u0438\u0447","twitter_card":"summary_large_image","twitter_misc":{"\u041d\u0430\u043f\u0438\u0441\u0430\u043d\u043e \u0430\u0432\u0442\u043e\u0440\u043e\u043c":"\u0410\u043d\u0442\u043e\u043d \u0418\u0432\u0430\u043d\u043e\u0432\u0438\u0447","\u041f\u0440\u0438\u043c\u0435\u0440\u043d\u043e\u0435 \u0432\u0440\u0435\u043c\u044f \u0434\u043b\u044f \u0447\u0442\u0435\u043d\u0438\u044f":"1 \u043c\u0438\u043d\u0443\u0442\u0430"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/codeshot.ru\/?p=268#article","isPartOf":{"@id":"https:\/\/codeshot.ru\/?p=268"},"author":{"name":"\u0410\u043d\u0442\u043e\u043d \u0418\u0432\u0430\u043d\u043e\u0432\u0438\u0447","@id":"https:\/\/codeshot.ru\/#\/schema\/person\/ae4675b745dd574854e37ce5240ecace"},"headline":"Laravel 10 OAuth\u20112.0 \u0441 Sanctum: \u043f\u043e\u043b\u043d\u043e\u0435 \u0440\u0443\u043a\u043e\u0432\u043e\u0434\u0441\u0442\u0432\u043e","datePublished":"2026-09-28T14:36:01+00:00","mainEntityOfPage":{"@id":"https:\/\/codeshot.ru\/?p=268"},"wordCount":439,"commentCount":0,"publisher":{"@id":"https:\/\/codeshot.ru\/#organization"},"image":{"@id":"https:\/\/codeshot.ru\/?p=268#primaryimage"},"thumbnailUrl":"https:\/\/codeshot.ru\/wp-content\/uploads\/2026\/09\/laravel-10-oauth-2-0-d181-sanctum-d0bfd0bed0bbd0bdd0bed0b5-d180d183d0bad0bed0b2d0bed0b4d181d182d0b2d0be.jpg","keywords":["laravel","oauth2","sanctum"],"articleSection":["API","Coding","\u041e\u0431\u043e \u0432\u0441\u0451\u043c"],"inLanguage":"ru-RU","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/codeshot.ru\/?p=268#respond"]}]},{"@type":"WebPage","@id":"https:\/\/codeshot.ru\/?p=268","url":"https:\/\/codeshot.ru\/?p=268","name":"Laravel 10 OAuth\u20112.0 \u0441 Sanctum: \u043f\u043e\u043b\u043d\u043e\u0435 \u0440\u0443\u043a\u043e\u0432\u043e\u0434\u0441\u0442\u0432\u043e - CODESHOT - \u041f\u043e\u043b\u0435\u0437\u043d\u044b\u0439 \u043a\u043e\u0434","isPartOf":{"@id":"https:\/\/codeshot.ru\/#website"},"primaryImageOfPage":{"@id":"https:\/\/codeshot.ru\/?p=268#primaryimage"},"image":{"@id":"https:\/\/codeshot.ru\/?p=268#primaryimage"},"thumbnailUrl":"https:\/\/codeshot.ru\/wp-content\/uploads\/2026\/09\/laravel-10-oauth-2-0-d181-sanctum-d0bfd0bed0bbd0bdd0bed0b5-d180d183d0bad0bed0b2d0bed0b4d181d182d0b2d0be.jpg","datePublished":"2026-09-28T14:36:01+00:00","description":"\u0423\u0437\u043d\u0430\u0439\u0442\u0435, \u043a\u0430\u043a \u043d\u0430\u0441\u0442\u0440\u043e\u0438\u0442\u044c OAuth\u20112.0 \u0430\u0443\u0442\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u044e \u0432 Laravel 10 \u0441 Sanctum, \u0441\u043e\u0437\u0434\u0430\u0432\u0430\u0442\u044c \u0442\u043e\u043a\u0435\u043d\u044b \u0438 \u043e\u0431\u043d\u043e\u0432\u043b\u044f\u0442\u044c \u0438\u0445. \u0411\u044b\u0441\u0442\u0440\u044b\u0439 \u0441\u0442\u0430\u0440\u0442, \u043f\u043e\u0434\u0440\u043e\u0431\u043d\u044b\u0435 \u0448\u0430\u0433\u0438, \u0440\u0435\u0430\u043b\u044c\u043d\u044b\u0435 \u043f\u0440\u0438\u043c\u0435\u0440\u044b. \u041d\u0430\u0447\u043d\u0438\u0442\u0435 \u043f\u0440\u044f\u043c\u043e \u0441\u0435\u0439\u0447\u0430\u0441!","breadcrumb":{"@id":"https:\/\/codeshot.ru\/?p=268#breadcrumb"},"inLanguage":"ru-RU","potentialAction":[{"@type":"ReadAction","target":["https:\/\/codeshot.ru\/?p=268"]}]},{"@type":"ImageObject","inLanguage":"ru-RU","@id":"https:\/\/codeshot.ru\/?p=268#primaryimage","url":"https:\/\/codeshot.ru\/wp-content\/uploads\/2026\/09\/laravel-10-oauth-2-0-d181-sanctum-d0bfd0bed0bbd0bdd0bed0b5-d180d183d0bad0bed0b2d0bed0b4d181d182d0b2d0be.jpg","contentUrl":"https:\/\/codeshot.ru\/wp-content\/uploads\/2026\/09\/laravel-10-oauth-2-0-d181-sanctum-d0bfd0bed0bbd0bdd0bed0b5-d180d183d0bad0bed0b2d0bed0b4d181d182d0b2d0be.jpg","width":1024,"height":576},{"@type":"BreadcrumbList","@id":"https:\/\/codeshot.ru\/?p=268#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"\u0413\u043b\u0430\u0432\u043d\u0430\u044f \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0430","item":"https:\/\/codeshot.ru\/"},{"@type":"ListItem","position":2,"name":"Laravel 10 OAuth\u20112.0 \u0441 Sanctum: \u043f\u043e\u043b\u043d\u043e\u0435 \u0440\u0443\u043a\u043e\u0432\u043e\u0434\u0441\u0442\u0432\u043e"}]},{"@type":"WebSite","@id":"https:\/\/codeshot.ru\/#website","url":"https:\/\/codeshot.ru\/","name":"CODESHOT - \u041f\u043e\u043b\u0435\u0437\u043d\u044b\u0439 \u043a\u043e\u0434","description":"\u0420\u0430\u0437\u043b\u0438\u0447\u043d\u044b\u0439 \u043a\u043e\u0434 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c, \u0441\u0430\u0439\u0442\u043e\u0432, \u043c\u043e\u0431\u0438\u043b\u043e\u043a \u0438 \u0441\u043a\u0440\u0438\u043f\u0442\u043e\u0432!","publisher":{"@id":"https:\/\/codeshot.ru\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/codeshot.ru\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"ru-RU"},{"@type":"Organization","@id":"https:\/\/codeshot.ru\/#organization","name":"CODESHOT - \u041f\u043e\u043b\u0435\u0437\u043d\u044b\u0439 \u043a\u043e\u0434","url":"https:\/\/codeshot.ru\/","logo":{"@type":"ImageObject","inLanguage":"ru-RU","@id":"https:\/\/codeshot.ru\/#\/schema\/logo\/image\/","url":"https:\/\/codeshot.ru\/wp-content\/uploads\/2025\/04\/logo-agency.png","contentUrl":"https:\/\/codeshot.ru\/wp-content\/uploads\/2025\/04\/logo-agency.png","width":200,"height":200,"caption":"CODESHOT - \u041f\u043e\u043b\u0435\u0437\u043d\u044b\u0439 \u043a\u043e\u0434"},"image":{"@id":"https:\/\/codeshot.ru\/#\/schema\/logo\/image\/"}},{"@type":"Person","@id":"https:\/\/codeshot.ru\/#\/schema\/person\/ae4675b745dd574854e37ce5240ecace","name":"\u0410\u043d\u0442\u043e\u043d \u0418\u0432\u0430\u043d\u043e\u0432\u0438\u0447","image":{"@type":"ImageObject","inLanguage":"ru-RU","@id":"https:\/\/codeshot.ru\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/12cc23cc07df127aea83020242b93fad313980fe7ec7ae6915395c9e002a891f?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/12cc23cc07df127aea83020242b93fad313980fe7ec7ae6915395c9e002a891f?s=96&d=mm&r=g","caption":"\u0410\u043d\u0442\u043e\u043d \u0418\u0432\u0430\u043d\u043e\u0432\u0438\u0447"},"url":"https:\/\/codeshot.ru\/?author=2"}]}},"_links":{"self":[{"href":"https:\/\/codeshot.ru\/index.php?rest_route=\/wp\/v2\/posts\/268","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/codeshot.ru\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/codeshot.ru\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/codeshot.ru\/index.php?rest_route=\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/codeshot.ru\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=268"}],"version-history":[{"count":0,"href":"https:\/\/codeshot.ru\/index.php?rest_route=\/wp\/v2\/posts\/268\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/codeshot.ru\/index.php?rest_route=\/wp\/v2\/media\/269"}],"wp:attachment":[{"href":"https:\/\/codeshot.ru\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=268"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/codeshot.ru\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=268"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/codeshot.ru\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=268"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}