{"id":2592,"date":"2025-08-12T13:13:15","date_gmt":"2025-08-12T13:13:15","guid":{"rendered":"https:\/\/www.devopsconsulting.in\/blog\/?p=2592"},"modified":"2025-12-08T12:10:50","modified_gmt":"2025-12-08T12:10:50","slug":"a-developers-guide-to-integrating-keycloak-sso-with-laravel-12","status":"publish","type":"post","link":"https:\/\/www.devopsconsulting.in\/blog\/a-developers-guide-to-integrating-keycloak-sso-with-laravel-12\/","title":{"rendered":"A Developer&#8217;s Guide to Integrating Keycloak SSO with Laravel 12"},"content":{"rendered":"\n<p><strong>A Developer&#8217;s Guide to Integrating Keycloak SSO with Laravel 12<\/strong><\/p>\n\n\n\n<p>In this guide, we&#8217;ll walk through a popular and flexible method for integrating Keycloak with a Laravel 12 application. Instead of forcing all users through Keycloak, we will add a &#8220;Login with Keycloak&#8221; button to the existing login page. This gives users the choice between traditional password-based login and a seamless Single Sign-On (SSO) experience.<\/p>\n\n\n\n<p>This approach uses Laravel Socialite, the standard for handling OAuth-based authentication from third-party providers.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Step 1: Verify Your Keycloak Client Configuration<\/h2>\n\n\n\n<p>This is a critical step. A mismatch in the redirect URI is the most common cause of errors in a Socialite flow.<\/p>\n\n\n\n<ol class=\"wp-block-list\">\n<li>Log in to your Keycloak Admin Console (usually&nbsp;<code>http:\/\/localhost:8080<\/code>).<\/li>\n\n\n\n<li>Navigate to your realm (e.g.,&nbsp;<code>laravel-app<\/code>).<\/li>\n\n\n\n<li>Go to&nbsp;<strong>Clients<\/strong>&nbsp;and select the client you created (e.g.,&nbsp;<code>laravel-client<\/code>).<\/li>\n\n\n\n<li>In the client settings, ensure the&nbsp;<strong>Valid Redirect URIs<\/strong>&nbsp;field contains the exact callback URL you set in your&nbsp;<code>.env<\/code>&nbsp;file. It should be:<br><code>http:\/\/127.0.0.1:8000\/auth\/keycloak\/callback<\/code><\/li>\n<\/ol>\n\n\n\n<p>If this URL is missing or incorrect, add it and save the changes.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Step 2: Test the Login Flow as a User<\/h2>\n\n\n\n<p>Now, let&#8217;s simulate the user&#8217;s journey. It&#8217;s highly recommended to use a&nbsp;<strong>private or incognito browser window<\/strong>&nbsp;to avoid any conflicts with existing login sessions.<\/p>\n\n\n\n<ol class=\"wp-block-list\">\n<li><strong>Navigate to the Login Page:<\/strong>&nbsp;Open your private browser window and go to your Laravel application&#8217;s login page:<br><code>http:\/\/127.0.0.1:8000\/login<\/code><\/li>\n\n\n\n<li><strong>Click the Keycloak Button:<\/strong>&nbsp;You should see the standard Laravel login form and your new &#8220;Login with Keycloak&#8221; button. Click it.<\/li>\n\n\n\n<li><strong>Redirection to Keycloak:<\/strong>&nbsp;Your browser should immediately redirect you to the Keycloak login page. The URL in the address bar will change to&nbsp;<code>http:\/\/localhost:8080\/...<\/code>.<\/li>\n\n\n\n<li><strong>Log In with Keycloak Credentials:<\/strong>&nbsp;Enter the username and password for the test user you created in Keycloak (e.g.,&nbsp;<code>testuser<\/code>). Click &#8220;Sign In&#8221;.<\/li>\n\n\n\n<li><strong>Redirection Back to Laravel:<\/strong>&nbsp;After a successful login, Keycloak will redirect you back to your Laravel application. Based on the logic in your&nbsp;<code>KeycloakController<\/code>, you should land on the&nbsp;<code>\/home<\/code>&nbsp;page, fully authenticated.<\/li>\n<\/ol>\n\n\n\n<h2 class=\"wp-block-heading\">Step 3: Verify the User in Your Database<\/h2>\n\n\n\n<p>The final step is to confirm that the&nbsp;<code>callback<\/code>&nbsp;method in your controller worked correctly and created a new user in your local database.<\/p>\n\n\n\n<ol class=\"wp-block-list\">\n<li>Open your preferred database management tool (like phpMyAdmin, TablePlus, or Sequel Ace).<\/li>\n\n\n\n<li>Connect to your Laravel application&#8217;s database (e.g.,&nbsp;<code>laravel_rbac<\/code>).<\/li>\n\n\n\n<li>Open the&nbsp;<code>users<\/code>&nbsp;table.<\/li>\n<\/ol>\n\n\n\n<p>You should see a new entry for the user you just authenticated with Keycloak. The user&#8217;s&nbsp;<code>email<\/code>&nbsp;and&nbsp;<code>name<\/code>&nbsp;should be populated with the information from their Keycloak account.<\/p>\n\n\n\n<p>If you have successfully completed all these steps, your Keycloak integration is fully functional. You have successfully implemented a dual-authentication system, giving your users the flexibility to log in with either local credentials or their centralized Keycloak account.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Step 4: Revert to Laravel&#8217;s Default Authentication<\/h2>\n\n\n\n<p>If you have previously attempted other SSO integrations (like a guard-based redirect), it&#8217;s crucial to revert your <code>config\/auth.php<\/code> file back to Laravel&#8217;s default settings to avoid conflicts. This ensures that Laravel&#8217;s standard session authentication is active, which we will then extend with our SSO provider.<\/p>\n\n\n\n<p>Open <code>config\/auth.php<\/code> and ensure your <code>guards<\/code> and <code>providers<\/code> arrays look like this:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">php<code><em>\/\/ config\/auth.php<\/em>\n\n'guards' =&gt; [\n    'web' =&gt; [\n        'driver' =&gt; 'session',\n        'provider' =&gt; 'users',\n    ],\n],\n\n'providers' =&gt; [\n    'users' =&gt; [\n        'driver' =&gt; 'eloquent',\n        'model' =&gt; App\\Models\\User::class,\n    ],\n],\n<\/code><\/pre>\n\n\n\n<p>After saving the file, clear your configuration cache to apply the changes:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"><code>php artisan config:clear<br><\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\">Step 4: Install and Configure the Keycloak Socialite Package<\/h2>\n\n\n\n<p>First, we need to add the necessary package to our project using Composer:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"><code>composer require socialiteproviders\/keycloak<br><\/code><\/pre>\n\n\n\n<p>Next, configure your application&#8217;s environment variables by opening the <code>.env<\/code> file and adding your Keycloak server details:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">text<code># .env file\nKEYCLOAK_BASE_URL=http:\/\/localhost:8080\nKEYCLOAK_REALM=laravel-app\nKEYCLOAK_CLIENT_ID=laravel-client\nKEYCLOAK_CLIENT_SECRET=your-client-secret-from-keycloak\nKEYCLOAK_REDIRECT_URI=\"http:\/\/127.0.0.1:8000\/auth\/keycloak\/callback\"\n<\/code><\/pre>\n\n\n\n<p>Now, tell Laravel about the Keycloak service by adding an entry to the <code>config\/services.php<\/code> file:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">php<code><em>\/\/ config\/services.php<\/em>\n'keycloak' =&gt; [\n  'client_id' =&gt; env('KEYCLOAK_CLIENT_ID'),\n  'client_secret' =&gt; env('KEYCLOAK_CLIENT_SECRET'),\n  'redirect' =&gt; env('KEYCLOAK_REDIRECT_URI'),\n  'base_url' =&gt; env('KEYCLOAK_BASE_URL'),\n  'realm' =&gt; env('KEYCLOAK_REALM'),\n],\n<\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\">Step 5: Register the Socialite Event Listener<\/h2>\n\n\n\n<p>In modern Laravel, the <code>app\/Providers\/EventServiceProvider.php<\/code> file may not exist by default. We need to create it to register our Socialite provider.<\/p>\n\n\n\n<p>First, run the Artisan command to generate the file:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"><code>php artisan make:provider EventServiceProvider<br><\/code><\/pre>\n\n\n\n<p>Now, open the newly created <code>app\/Providers\/EventServiceProvider.php<\/code> and add the event listener for the Keycloak Socialite provider to the <code>$listen<\/code> array:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">php<code><em>\/\/ app\/Providers\/EventServiceProvider.php<\/em>\nprotected $listen = [\n    \\Illuminate\\Auth\\Events\\Registered::class =&gt; [\n        \\Illuminate\\Auth\\Listeners\\SendEmailVerificationNotification::class,\n    ],\n    <em>\/\/ Add this entry for the Keycloak provider<\/em>\n    \\SocialiteProviders\\Manager\\SocialiteWasCalled::class =&gt; [\n        \\SocialiteProviders\\Keycloak\\KeycloakExtendSocialite::class.'@handle',\n    ],\n];\n<\/code><\/pre>\n\n\n\n<p>Laravel will automatically discover and load this service provider.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Step 6: Create the Authentication Routes and Controller<\/h2>\n\n\n\n<p>This SSO flow requires two routes: one to redirect the user to Keycloak and a callback route for Keycloak to return the user to.<\/p>\n\n\n\n<p>First, create the controller that will handle the logic:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"><code>php artisan make:controller Auth\/KeycloakController<br><\/code><\/pre>\n\n\n\n<p>Next, add the routes to your <code>routes\/web.php<\/code> file:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">php<code><em>\/\/ routes\/web.php<\/em>\nuse App\\Http\\Controllers\\Auth\\KeycloakController;\n\nRoute::get('\/auth\/keycloak\/redirect', [KeycloakController::class, 'redirect'])-&gt;name('keycloak.login');\nRoute::get('\/auth\/keycloak\/callback', [KeycloakController::class, 'callback']);\n<\/code><\/pre>\n\n\n\n<p>Now, open <code>app\/Http\/Controllers\/Auth\/KeycloakController.php<\/code> and add the business logic. This code will handle the redirect and, upon the user&#8217;s return, create or find their account in your local database before logging them in.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">php<code>&lt;?php\n\nnamespace App\\Http\\Controllers\\Auth;\n\nuse App\\Http\\Controllers\\Controller;\nuse App\\Models\\User;\nuse Illuminate\\Support\\Facades\\Auth;\nuse Illuminate\\Support\\Facades\\Hash;\nuse Illuminate\\Support\\Str;\nuse Laravel\\Socialite\\Facades\\Socialite;\n\nclass KeycloakController extends Controller\n{\n    public function redirect()\n    {\n        return Socialite::driver('keycloak')-&gt;redirect();\n    }\n\n    public function callback()\n    {\n        $keycloakUser = Socialite::driver('keycloak')-&gt;user();\n\n        $user = User::updateOrCreate(\n            [\n                'email' =&gt; $keycloakUser-&gt;getEmail(),\n            ],\n            [\n                'name' =&gt; $keycloakUser-&gt;getName(),\n                'password' =&gt; Hash::make(Str::random(24)), <em>\/\/ Create a random, unusable password<\/em>\n            ]\n        );\n\n        Auth::login($user);\n\n        return redirect('\/home');\n    }\n}\n<\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\">Step 7: Add the SSO Button to Your Login Page<\/h2>\n\n\n\n<p>Modify your <code>resources\/views\/auth\/login.blade.php<\/code> file to include a &#8220;Login with Keycloak&#8221; button. This gives users a clear choice.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">xml<code><em>&lt;!-- resources\/views\/auth\/login.blade.php --&gt;<\/em>\n@extends('layouts.app')\n\n@section('content')\n&lt;div class=\"container\"&gt;\n    &lt;div class=\"row justify-content-center\"&gt;\n        &lt;div class=\"col-md-8\"&gt;\n            &lt;div class=\"card\"&gt;\n                &lt;div class=\"card-header\"&gt;{{ __('Login') }}&lt;\/div&gt;\n                &lt;div class=\"card-body\"&gt;\n                    <em>&lt;!-- Existing Login Form --&gt;<\/em>\n                    &lt;form method=\"POST\" action=\"{{ route('login') }}\"&gt;\n                        @csrf\n                        {{-- ... form fields ... --}}\n                        &lt;div class=\"row mb-0\"&gt;\n                            &lt;div class=\"col-md-8 offset-md-4\"&gt;\n                                &lt;button type=\"submit\" class=\"btn btn-primary\"&gt;\n                                    {{ __('Login') }}\n                                &lt;\/button&gt;\n                            &lt;\/div&gt;\n                        &lt;\/div&gt;\n                    &lt;\/form&gt;\n                    &lt;hr&gt;\n                    <em>&lt;!-- Keycloak Login Button --&gt;<\/em>\n                    &lt;div class=\"text-center\"&gt;\n                        &lt;a href=\"{{ route('keycloak.login') }}\" class=\"btn btn-secondary\"&gt;\n                            Login with Keycloak\n                        &lt;\/a&gt;\n                    &lt;\/div&gt;\n                &lt;\/div&gt;\n            &lt;\/div&gt;\n        &lt;\/div&gt;\n    &lt;\/div&gt;\n&lt;\/div&gt;\n@endsection\n<\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\">Step 8: The Final Test &#8211; End-to-End Verification<\/h2>\n\n\n\n<p>With everything configured, it&#8217;s time to test the full flow.<\/p>\n\n\n\n<ol class=\"wp-block-list\">\n<li><strong>Start Your Servers:<\/strong> Ensure both your Keycloak instance (via <code>docker-compose up<\/code>) and your Laravel development server (<code>php artisan serve<\/code>) are running.<\/li>\n\n\n\n<li><strong>Verify Keycloak Configuration:<\/strong> Log in to your Keycloak admin console, navigate to your client, and confirm that <code>http:\/\/127.0.0.1:8000\/auth\/keycloak\/callback<\/code> is listed under <strong>Valid Redirect URIs<\/strong>. This is a critical step.<\/li>\n\n\n\n<li><strong>Test the User Flow:<\/strong>\n<ul class=\"wp-block-list\">\n<li>Open a private or incognito browser window and go to <code>http:\/\/127.0.0.1:8000\/login<\/code>.<\/li>\n\n\n\n<li>Click the <strong>&#8220;Login with Keycloak&#8221;<\/strong> button.<\/li>\n\n\n\n<li>You should be redirected to the Keycloak login page. Enter your test user&#8217;s credentials.<\/li>\n\n\n\n<li>After logging in, you should be redirected back to your Laravel application&#8217;s <code>\/home<\/code> page, fully authenticated.<\/li>\n<\/ul>\n<\/li>\n\n\n\n<li><strong>Verify Database Entry:<\/strong> Check the <code>users<\/code> table in your application&#8217;s database. You should see a new record for the user who just logged in, with their name and email populated from Keycloak.<\/li>\n<\/ol>\n\n\n\n<p>Congratulations! You have successfully implemented a dual-authentication system, offering your users the security and convenience of SSO.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>A Developer&#8217;s Guide to Integrating Keycloak SSO with Laravel 12 In this guide, we&#8217;ll walk through a popular and flexible [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1424,87],"tags":[1420,1422,1414,1415,1417,1411,1416,1413,1421,1423,1409,1419,1412,1410,1418],"class_list":["post-2592","post","type-post","status-publish","format-standard","hentry","category-keycloak","category-laravel","tag-configure-laravel-for-keycloak-sso","tag-dual-authentication-laravel-keycloak","tag-how-to-setup-keycloak-with-laravel","tag-integrate-keycloak-login-with-laravel","tag-keycloak-as-identity-provider-for-laravel","tag-keycloak-single-sign-on","tag-laravel-12-keycloak-sso-guide","tag-laravel-authentication","tag-laravel-eventserviceprovider-socialite","tag-laravel-keycloak-callback-handling","tag-laravel-keycloak-integration","tag-laravel-oidc-authentication","tag-laravel-socialite-keycloak","tag-laravel-sso","tag-socialiteproviders-keycloak-tutorial"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v25.7 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>A Developer&#039;s Guide to Integrating Keycloak SSO with Laravel 12 - DevOps Consulting<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.devopsconsulting.in\/blog\/a-developers-guide-to-integrating-keycloak-sso-with-laravel-12\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"A Developer&#039;s Guide to Integrating Keycloak SSO with Laravel 12 - DevOps Consulting\" \/>\n<meta property=\"og:description\" content=\"A Developer&#8217;s Guide to Integrating Keycloak SSO with Laravel 12 In this guide, we&#8217;ll walk through a popular and flexible [&hellip;]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.devopsconsulting.in\/blog\/a-developers-guide-to-integrating-keycloak-sso-with-laravel-12\/\" \/>\n<meta property=\"og:site_name\" content=\"DevOps Consulting\" \/>\n<meta property=\"article:published_time\" content=\"2025-08-12T13:13:15+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2025-12-08T12:10:50+00:00\" \/>\n<meta name=\"author\" content=\"Abhishek Singh\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Abhishek Singh\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"4 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.devopsconsulting.in\/blog\/a-developers-guide-to-integrating-keycloak-sso-with-laravel-12\/\",\"url\":\"https:\/\/www.devopsconsulting.in\/blog\/a-developers-guide-to-integrating-keycloak-sso-with-laravel-12\/\",\"name\":\"A Developer's Guide to Integrating Keycloak SSO with Laravel 12 - DevOps Consulting\",\"isPartOf\":{\"@id\":\"https:\/\/www.devopsconsulting.in\/blog\/#website\"},\"datePublished\":\"2025-08-12T13:13:15+00:00\",\"dateModified\":\"2025-12-08T12:10:50+00:00\",\"author\":{\"@id\":\"https:\/\/www.devopsconsulting.in\/blog\/#\/schema\/person\/fc397ba8be42f9fdd53450edfc73006f\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.devopsconsulting.in\/blog\/a-developers-guide-to-integrating-keycloak-sso-with-laravel-12\/\"]}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.devopsconsulting.in\/blog\/#website\",\"url\":\"https:\/\/www.devopsconsulting.in\/blog\/\",\"name\":\"DevOps Consulting\",\"description\":\"DevOps Consulting | SRE Consulting | DevSecOps Consulting | MLOps Consulting\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.devopsconsulting.in\/blog\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.devopsconsulting.in\/blog\/#\/schema\/person\/fc397ba8be42f9fdd53450edfc73006f\",\"name\":\"Abhishek Singh\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.devopsconsulting.in\/blog\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/790feefe779852cdf344ca7318bf6c13832223c9b3c6bf4d217658412041026d?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/790feefe779852cdf344ca7318bf6c13832223c9b3c6bf4d217658412041026d?s=96&d=mm&r=g\",\"caption\":\"Abhishek Singh\"},\"description\":\"I\u2019m Abhishek, a DevOps, SRE, DevSecOps, and Cloud expert with a passion for sharing knowledge and real-world experiences. I\u2019ve had the opportunity to work with Cotocus and continue to contribute to multiple platforms where I share insights across different domains: \u2022 DevOps School \u2013 Tech blogs and tutorials \u2022 Holiday Landmark \u2013 Travel stories and guides \u2022 Stocks Mantra \u2013 Stock market strategies and tips \u2022 My Medic Plus \u2013 Health and fitness guidance \u2022 TrueReviewNow \u2013 Honest product reviews \u2022 Wizbrand \u2013 SEO and digital tools for businesses I\u2019m also exploring the fascinating world of Quantum Computing.\",\"url\":\"https:\/\/www.devopsconsulting.in\/blog\/author\/abhishek\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"A Developer's Guide to Integrating Keycloak SSO with Laravel 12 - DevOps Consulting","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:\/\/www.devopsconsulting.in\/blog\/a-developers-guide-to-integrating-keycloak-sso-with-laravel-12\/","og_locale":"en_US","og_type":"article","og_title":"A Developer's Guide to Integrating Keycloak SSO with Laravel 12 - DevOps Consulting","og_description":"A Developer&#8217;s Guide to Integrating Keycloak SSO with Laravel 12 In this guide, we&#8217;ll walk through a popular and flexible [&hellip;]","og_url":"https:\/\/www.devopsconsulting.in\/blog\/a-developers-guide-to-integrating-keycloak-sso-with-laravel-12\/","og_site_name":"DevOps Consulting","article_published_time":"2025-08-12T13:13:15+00:00","article_modified_time":"2025-12-08T12:10:50+00:00","author":"Abhishek Singh","twitter_card":"summary_large_image","twitter_misc":{"Written by":"Abhishek Singh","Est. reading time":"4 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/www.devopsconsulting.in\/blog\/a-developers-guide-to-integrating-keycloak-sso-with-laravel-12\/","url":"https:\/\/www.devopsconsulting.in\/blog\/a-developers-guide-to-integrating-keycloak-sso-with-laravel-12\/","name":"A Developer's Guide to Integrating Keycloak SSO with Laravel 12 - DevOps Consulting","isPartOf":{"@id":"https:\/\/www.devopsconsulting.in\/blog\/#website"},"datePublished":"2025-08-12T13:13:15+00:00","dateModified":"2025-12-08T12:10:50+00:00","author":{"@id":"https:\/\/www.devopsconsulting.in\/blog\/#\/schema\/person\/fc397ba8be42f9fdd53450edfc73006f"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.devopsconsulting.in\/blog\/a-developers-guide-to-integrating-keycloak-sso-with-laravel-12\/"]}]},{"@type":"WebSite","@id":"https:\/\/www.devopsconsulting.in\/blog\/#website","url":"https:\/\/www.devopsconsulting.in\/blog\/","name":"DevOps Consulting","description":"DevOps Consulting | SRE Consulting | DevSecOps Consulting | MLOps Consulting","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.devopsconsulting.in\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Person","@id":"https:\/\/www.devopsconsulting.in\/blog\/#\/schema\/person\/fc397ba8be42f9fdd53450edfc73006f","name":"Abhishek Singh","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.devopsconsulting.in\/blog\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/790feefe779852cdf344ca7318bf6c13832223c9b3c6bf4d217658412041026d?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/790feefe779852cdf344ca7318bf6c13832223c9b3c6bf4d217658412041026d?s=96&d=mm&r=g","caption":"Abhishek Singh"},"description":"I\u2019m Abhishek, a DevOps, SRE, DevSecOps, and Cloud expert with a passion for sharing knowledge and real-world experiences. I\u2019ve had the opportunity to work with Cotocus and continue to contribute to multiple platforms where I share insights across different domains: \u2022 DevOps School \u2013 Tech blogs and tutorials \u2022 Holiday Landmark \u2013 Travel stories and guides \u2022 Stocks Mantra \u2013 Stock market strategies and tips \u2022 My Medic Plus \u2013 Health and fitness guidance \u2022 TrueReviewNow \u2013 Honest product reviews \u2022 Wizbrand \u2013 SEO and digital tools for businesses I\u2019m also exploring the fascinating world of Quantum Computing.","url":"https:\/\/www.devopsconsulting.in\/blog\/author\/abhishek\/"}]}},"_links":{"self":[{"href":"https:\/\/www.devopsconsulting.in\/blog\/wp-json\/wp\/v2\/posts\/2592","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.devopsconsulting.in\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.devopsconsulting.in\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.devopsconsulting.in\/blog\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.devopsconsulting.in\/blog\/wp-json\/wp\/v2\/comments?post=2592"}],"version-history":[{"count":3,"href":"https:\/\/www.devopsconsulting.in\/blog\/wp-json\/wp\/v2\/posts\/2592\/revisions"}],"predecessor-version":[{"id":3859,"href":"https:\/\/www.devopsconsulting.in\/blog\/wp-json\/wp\/v2\/posts\/2592\/revisions\/3859"}],"wp:attachment":[{"href":"https:\/\/www.devopsconsulting.in\/blog\/wp-json\/wp\/v2\/media?parent=2592"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.devopsconsulting.in\/blog\/wp-json\/wp\/v2\/categories?post=2592"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.devopsconsulting.in\/blog\/wp-json\/wp\/v2\/tags?post=2592"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}