# What is mustRotateKeysBefore in authorityMembers.members pallet?

**URL:** https://forum.duniter.org/t/what-is-mustrotatekeysbefore-in-authoritymembers-members-pallet/11196
**Category:** Duniter-v2
**Created:** [25 May 2023 08:50 UTC](https://forum.duniter.org/t/what-is-mustrotatekeysbefore-in-authoritymembers-members-pallet/11196 "2023-05-25T08:50:26Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![guenoel](https://forum.duniter.org/user_avatar/forum.duniter.org/guenoel/32/9075_2.png) [@guenoel](https://forum.duniter.org/u/guenoel)
#### Post date: [25 May 2023 08:50 UTC](https://forum.duniter.org/t/what-is-mustrotatekeysbefore-in-authoritymembers-members-pallet/11196/1 "2023-05-25T08:50:26Z")

</div>

Hello,  
Can someone remind me what is “mustRotateKeysBefore” in authorityMembers.members pallet ?  
Thanks

---

<div class="post-metadata">

### Author: ![tuxmain](https://forum.duniter.org/user_avatar/forum.duniter.org/tuxmain/32/6423_2.png) [@tuxmain](https://forum.duniter.org/u/tuxmain)
#### Post date: [25 May 2023 09:22 UTC](https://forum.duniter.org/t/what-is-mustrotatekeysbefore-in-authoritymembers-members-pallet/11196/2 "2023-05-25T09:22:27Z")

</div>

`expire_on_session` is the authority membership expiration. It is updated as well as `must_rotate_keys_before` when session keys are updated.

However I don’t understand `expire_on_session`:

- `set_session_keys` sets it to `current + MaxOfflineSessions`
- when an authority is outgoing, when the next session begins, `expire_on_session` is set to `current + MaxOfflineSessions`, but only when there is no incoming authority.
- I can’t find any other update: I guess it should be updated on `ImOnline` or at every session when the authority is active.
