# Gitea, Keycloak, Login session time

**URL:** <https://forum.gitea.com/t/gitea-keycloak-login-session-time/9869>\
**Category:** Gitea Usages\
**Created:** [October 16, 2024, 4:52am UTC](https://forum.gitea.com/t/gitea-keycloak-login-session-time/9869 "2024-10-16T04:52:29Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![an0nym0](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.gitea.com/an0nym0/32/6327_2.png) [@an0nym0](https://forum.gitea.com/u/an0nym0)\
**Post date:** [October 16, 2024, 4:52am UTC](https://forum.gitea.com/t/gitea-keycloak-login-session-time/9869/1 "2024-10-16T04:52:29Z")

</div>

Hello,  
Could you help please to increase login session in keycloak auth in browser session?

As i see, when we use local account and check “Remember this device”, we receive a cookies.

- `_csrf` - set to expire 24 hours after login
- `gitea_awesome` - depends on LOGIN\_REMEMBER\_DAYS
- `gitea_incredible` - depends on LOGIN\_REMEMBER\_DAYS
- `i_like_gitea` - expires after session ends
- `lang` - expires after session ends

But when we use OpenID connect we have only \_csrf, i\_like\_gitea and lang, and should click OpenID button every day.

Is there a way around this?

Thanks and have a nice day.

---

<div class="post-metadata">

**Author:** ![lunny](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.gitea.com/lunny/32/4701_2.png) [@lunny](https://forum.gitea.com/u/lunny)\
**Post date:** [November 12, 2024, 6:00am UTC](https://forum.gitea.com/t/gitea-keycloak-login-session-time/9869/2 "2024-11-12T06:00:04Z")

</div>

> <https://github.com/go-gitea/gitea/issues/28394>
>
> \### Description
> 
> I have configured Gitea to auth with Authentik via OIDC. Prior …to that I was using local users, so the session would persist over a longer period, especially when 'Remember me' was ticked. I've noticed that when authenticating with OIDC, I don't remain logged in after closing the browser. This means users have to go through two extra clicks every time they visit in a new browser session. 
> 
> \### Gitea Version
> 
> 1.21.1
> 
> \### Can you reproduce the bug on the Gitea demo site?
> 
> Yes
> 
> \### Log Gist
> 
> \_No response\_
> 
> \### Screenshots
> 
> \_No response\_
> 
> \### Git Version
> 
> \_No response\_
> 
> \### Operating System
> 
> \_No response\_
> 
> \### How are you running Gitea?
> 
> Ubuntu/Docker
> 
> \### Database
> 
> MySQL/MariaDB

---

<div class="post-metadata">

**Author:** ![an0nym0](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.gitea.com/an0nym0/32/6327_2.png) [@an0nym0](https://forum.gitea.com/u/an0nym0)\
**Post date:** [November 13, 2024, 11:10am UTC](https://forum.gitea.com/t/gitea-keycloak-login-session-time/9869/3 "2024-11-13T11:10:33Z")

</div>

Hi, lunny.

Thanks for the information.  
It’s very sadly, that we don’t have any workaround yet.

Have a nice day.
