Null
BABetter Auth
•Created by Null on 5/21/2025 in #help
[Admin Plugin] Session not updated when user is updated
@bekacru do you think that could be included in better-auth? If so, please tell me so I can work on making a PR changing this.
11 replies
BABetter Auth
•Created by Null on 5/21/2025 in #help
[Admin Plugin] Session not updated when user is updated
Also, I think would be dangerous to keep sessions with an old role saved/active.
11 replies
BABetter Auth
•Created by Null on 5/21/2025 in #help
[Admin Plugin] Session not updated when user is updated
From userHasPermission code:
11 replies
BABetter Auth
•Created by Null on 5/21/2025 in #help
[Admin Plugin] Session not updated when user is updated
Permission checks are done using user at the session, so if session isn't updated, user would need to logout to have role updated.
11 replies
BABetter Auth
•Created by Null on 5/21/2025 in #help
[Admin Plugin] Session not updated when user is updated
Okay, I see, it happens because
updateUser
has this line:
I think at least activeSessions
should be updated in this case, I understand why it might not be a good default, but adding an optional setting for this would be really helpful.11 replies
BABetter Auth
•Created by Null on 5/21/2025 in #help
[Admin Plugin] Session not updated when user is updated
Could you help me with this @Ping ?
11 replies
BABetter Auth
•Created by Null on 5/21/2025 in #help
[Admin Plugin] Session not updated when user is updated
11 replies
BABetter Auth
•Created by aali on 5/20/2025 in #help
Better Auth (auth.api.getSession) causes problem in edge runtime
Hey! Check that: https://www.better-auth.com/docs/integrations/next#middleware
6 replies