---
title: "Discussion on \"Enterprise-Level Authentication in a Containerized Environment for Next.js 13\" | Hashnode"
description: "Discussion on \"Enterprise-Level Authentication in a Containerized Environment for Next.js 13\". Integrate NextJS, Keycloak and MySQL services and handle authentication flow in a containerized environment."
url: "https://hashnode.com/posts/enterprise-level-authentication-in-a-containerized-environment-for-nextjs-13/6669bee144671d67af5abd34"
---

[Feed](https://hashnode.com/feed) /

Discussion

# [Enterprise-Level Authentication in a Containerized Environment for Next.js 13](https://ulasozdemir.com.tr/enterprise-level-authentication-in-a-containerized-environment-for-nextjs-13?utm_source=hashnode&utm_medium=feed)

Integrate NextJS, Keycloak and MySQL services and handle authentication flow in a containerized environment.

Jun 12, 2024 · 20 min read · ulasozdemir.com.tr  
Updated Jun 13, 2024  
Read the article

-   [#keycloak](https://hashnode.com/tag/keycloak)
-   [#mysql](https://hashnode.com/tag/mysql)
-   [#docker](https://hashnode.com/tag/docker)
-   [#docker-compose](https://hashnode.com/tag/docker-compose)
-   [#nextjs](https://hashnode.com/tag/nextjs)
-   [#openid-connect](https://hashnode.com/tag/openid-connect)
-   [#oauth2](https://hashnode.com/tag/oauth2)
-   [#authentication](https://hashnode.com/tag/authentication)

## Written by

[Ulaş Özdemir](https://hashnode.com/@ozdemiru)

@ozdemiru

  
[View profile](https://hashnode.com/@ozdemiru)

I am passionate about advancing towards a post-scarcity economy and deeply respect organizations that prioritize unity, diversity, and meritocracy.

## Responses 2

Markdown supported · ⌘↵ to post

[LongHeng CHHOEUN](https://hashnode.com/@longheng)

[Sep 13, 2025](https://hashnode.com/posts/enterprise-level-authentication-in-a-containerized-environment-for-nextjs-13/6669bee144671d67af5abd34/comment/68c58bbd88dfb60ac7de5a17)

Hi mate, can you tell me how can I sign out to redirect user to login page ? and how can we redirect user to login page after user have not make any action on page for specific time that the token expire?

[LongHeng CHHOEUN](https://hashnode.com/@longheng)

[Sep 12, 2025](https://hashnode.com/posts/enterprise-level-authentication-in-a-containerized-environment-for-nextjs-13/6669bee144671d67af5abd34/comment/68c4075789fa9793ee99da9d)

I tried but it not working

[Ulaş Özdemir](https://hashnode.com/@ozdemiru)

[Sep 12, 2025](https://hashnode.com/posts/enterprise-level-authentication-in-a-containerized-environment-for-nextjs-13/6669bee144671d67af5abd34/comment/68c4075789fa9793ee99da9d#reply-68c40a683445322ddd1a9f06)

Hi mate, thanks for the comment and time you've invested on learning this implementation. It would be better for me to diagnose if you share some details about your attempt. Also, keep in mind that this is an old article so versions matter. What is the problem you are having?

[LongHeng CHHOEUN](https://hashnode.com/@longheng)

[Sep 12, 2025](https://hashnode.com/posts/enterprise-level-authentication-in-a-containerized-environment-for-nextjs-13/6669bee144671d67af5abd34/comment/68c4075789fa9793ee99da9d#reply-68c4106093802f6beb2cce5d)

[Ulaş Özdemir](https://hashnode.com/@ozdemiru) thank you.

now I can implement it just in keycloak latest version 26.3.3 I am not include KC\_FEATURE

[Ulaş Özdemir](https://hashnode.com/@ozdemiru)

[Sep 12, 2025](https://hashnode.com/posts/enterprise-level-authentication-in-a-containerized-environment-for-nextjs-13/6669bee144671d67af5abd34/comment/68c4075789fa9793ee99da9d#reply-68c4231ab1a782c95d0cf861)

[LongHeng CHHOEUN](https://hashnode.com/@longheng) Great!
