[GH-ISSUE #3064] auth cookie not refresh #9456

Closed
opened 2026-04-13 04:55:39 -05:00 by GiteaMirror · 4 comments
Owner

Originally created by @osmaine on GitHub (Jun 17, 2025).
Original GitHub issue: https://github.com/better-auth/better-auth/issues/3064

Is this suited for github?

  • Yes, this is suited for github

To Reproduce

export const auth = betterAuth({
    appName:'Warda',
    secret:process.env.BETTER_AUTH_SECRET,
    session: {
        expiresIn: 60 * 60 * 24 * 14, // 14 days
        updateAge: 60 * 60 * 24 ,// 1 day (every 1 day the session expiration is updated)
        //disableSessionRefresh: true, // Disable session refresh so that the session is not updated regardless of the `updateAge` option. (default: `false`)

    },
   //...
 })

Session expiration date can be refresh, but the auth cookie expiration date is not updated.

Current vs. Expected behavior

helps please

What version of Better Auth are you using?

1.2.9

Provide environment information

OS: windows 11
Browser : firefox

Which area(s) are affected? (Select all that apply)

Backend

Auth config (if applicable)

import { betterAuth } from "better-auth"
export const auth = betterAuth({
  emailAndPassword: {  
    enabled: true
  },
});

Additional context

No response

Originally created by @osmaine on GitHub (Jun 17, 2025). Original GitHub issue: https://github.com/better-auth/better-auth/issues/3064 ### Is this suited for github? - [ ] Yes, this is suited for github ### To Reproduce ```ts export const auth = betterAuth({ appName:'Warda', secret:process.env.BETTER_AUTH_SECRET, session: { expiresIn: 60 * 60 * 24 * 14, // 14 days updateAge: 60 * 60 * 24 ,// 1 day (every 1 day the session expiration is updated) //disableSessionRefresh: true, // Disable session refresh so that the session is not updated regardless of the `updateAge` option. (default: `false`) }, //... }) ``` Session expiration date can be refresh, but the auth cookie expiration date is not updated. ### Current vs. Expected behavior helps please ### What version of Better Auth are you using? 1.2.9 ### Provide environment information ```bash OS: windows 11 Browser : firefox ``` ### Which area(s) are affected? (Select all that apply) Backend ### Auth config (if applicable) ```typescript import { betterAuth } from "better-auth" export const auth = betterAuth({ emailAndPassword: { enabled: true }, }); ``` ### Additional context _No response_
GiteaMirror added the lockedbug labels 2026-04-13 04:55:39 -05:00
Author
Owner

@quuentinho commented on GitHub (Jun 26, 2025):

I have the same problem...

Any solutions ?

<!-- gh-comment-id:3007891562 --> @quuentinho commented on GitHub (Jun 26, 2025): I have the same problem... Any solutions ?
Author
Owner

@osmaine commented on GitHub (Jul 23, 2025):

No solution at now

Le jeu. 26 juin 2025, 09:52, Quentin @.***> a écrit :

QuentinBoulay left a comment (better-auth/better-auth#3064)
https://github.com/better-auth/better-auth/issues/3064#issuecomment-3007891562

I have the same problem...

Any solutions ?


Reply to this email directly, view it on GitHub
https://github.com/better-auth/better-auth/issues/3064#issuecomment-3007891562,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AMWK4KVFXW37P4SQGV56XJT3FO7EBAVCNFSM6AAAAAB7RDY5Z2VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZTAMBXHA4TCNJWGI
.
You are receiving this because you authored the thread.Message ID:
@.***>

<!-- gh-comment-id:3106101639 --> @osmaine commented on GitHub (Jul 23, 2025): No solution at now Le jeu. 26 juin 2025, 09:52, Quentin ***@***.***> a écrit : > *QuentinBoulay* left a comment (better-auth/better-auth#3064) > <https://github.com/better-auth/better-auth/issues/3064#issuecomment-3007891562> > > I have the same problem... > > Any solutions ? > > — > Reply to this email directly, view it on GitHub > <https://github.com/better-auth/better-auth/issues/3064#issuecomment-3007891562>, > or unsubscribe > <https://github.com/notifications/unsubscribe-auth/AMWK4KVFXW37P4SQGV56XJT3FO7EBAVCNFSM6AAAAAB7RDY5Z2VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZTAMBXHA4TCNJWGI> > . > You are receiving this because you authored the thread.Message ID: > ***@***.***> >
Author
Owner

@ping-maxwell commented on GitHub (Oct 10, 2025):

Are you calling get-session after it's expired? Since it's not able to automatically just refresh the cookie without calling certain auth related endpoints on your front-end.

<!-- gh-comment-id:3390826031 --> @ping-maxwell commented on GitHub (Oct 10, 2025): Are you calling get-session after it's expired? Since it's not able to automatically just refresh the cookie without calling certain auth related endpoints on your front-end.
Author
Owner

@ping-maxwell commented on GitHub (Oct 21, 2025):

Closing as no response from OP. Happy to re-open as needed.

<!-- gh-comment-id:3424336579 --> @ping-maxwell commented on GitHub (Oct 21, 2025): Closing as no response from OP. Happy to re-open as needed.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/better-auth#9456