# Auth Signatures/Sessions - Max lifetime, renewal, etc

**URL:** <https://devforum.zoom.us/t/auth-signatures-sessions-max-lifetime-renewal-etc/48739>\
**Category:** Web\
**Created:** [April 23, 2021, 4:31pm UTC](https://devforum.zoom.us/t/auth-signatures-sessions-max-lifetime-renewal-etc/48739 "2021-04-23T16:31:32Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![cscav](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/cscav/32/26284_2.png) [@cscav](https://devforum.zoom.us/u/cscav)\
**Post date:** [April 23, 2021, 4:31pm UTC](https://devforum.zoom.us/t/auth-signatures-sessions-max-lifetime-renewal-etc/48739/1 "2021-04-23T16:31:33Z")

</div>

**Description**  
[Current documentation on Generating Signatures](https://marketplace.zoom.us/docs/sdk/video/web/essential/signature) doesn’t offer many details, or maybe I’m missing something… The example code includes:

```auto
let signature = "";
const iat = Math.round(new Date().getTime() / 1000);
const exp = iat + 60 * 60 * 2;

```

…which I assume is saying the expiration will be 2 hours in the future, though I’ve yet to test this.

**Questions related to Signature/Session Lifetime:**

1. Is there a max lifetime? i.e. 24 hours?

2. Does each user need their own unique signature, or can one signature be used per topic?  
Example of the latter, if 3 people were joining a topic named “teammeeting”:

3. If **exp = 30 minutes** , will the user be disconnected after 30 min? (this is the behavior with CPAAS vendors such as Agora)

---

<div class="post-metadata">

**Author:** ![cscav](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/cscav/32/26284_2.png) [@cscav](https://devforum.zoom.us/u/cscav)\
**Post date:** [April 23, 2021, 4:58pm UTC](https://devforum.zoom.us/t/auth-signatures-sessions-max-lifetime-renewal-etc/48739/2 "2021-04-23T16:58:53Z")

</div>

Oh, I forgot passwords are topic-specific (I think), so the **password** in the above example would be the same for all users, instead of the 3 different passwords shown there.

But I don’t think this changes anything about my questions… topic-based signatures may still be possible, since the signature payload doesn’t seem to mandate any user-specific info:

```auto
const oPayload = {
  app_key: appKey,
  iat, exp, tpc: topic, pwd: passWord,
};
...
signature = KJUR.jws.JWS.sign('HS256', sHeader, sPayload, apiSecret);

```

---

<div class="post-metadata">

**Author:** ![bekit](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/bekit/32/26056_2.png) [@bekit](https://devforum.zoom.us/u/bekit)\
**Post date:** [April 23, 2021, 5:33pm UTC](https://devforum.zoom.us/t/auth-signatures-sessions-max-lifetime-renewal-etc/48739/3 "2021-04-23T17:33:17Z")

</div>

I’ve done some testing on this…

> [@cscav](#):
>
> Is there a max lifetime? i.e. 24 hours?

Somewhere in the documentation it states that the max lifetime is 48 hours. I haven’t tested this limit, but have seen available error codes for it so I assume this is accurate. I’ve gone from 2 minutes to 24 hours with no issues, though.

> [@cscav](#):
>
> Does each user need their own unique signature, or can one signature be used per topic?  
> Example of the latter, if 3 people were joining a topic named “teammeeting”:

The signatures are unique to topic && password. You can re-use a single signature for multiple users as long as it is within the expiration time. You can also use separate signatures for each user, so whatever works best for you should be fine.

> [@cscav](#):
>
> If **exp = 30 minutes** , will the user be disconnected after 30 min?

From my testing, no. I set an expiration to 2m and my session remained active well after that expiration had ended. I think the expiration is only checked during `join`.

---

<div class="post-metadata">

**Author:** ![cscav](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/cscav/32/26284_2.png) [@cscav](https://devforum.zoom.us/u/cscav)\
**Post date:** [April 23, 2021, 5:36pm UTC](https://devforum.zoom.us/t/auth-signatures-sessions-max-lifetime-renewal-etc/48739/4 "2021-04-23T17:36:11Z")

</div>

You’re a life saver, thank you sir.

---

<div class="post-metadata">

**Author:** ![tommy](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/tommy/32/72769_2.png) [@tommy](https://devforum.zoom.us/u/tommy)\
**Post date:** [April 27, 2021, 4:42pm UTC](https://devforum.zoom.us/t/auth-signatures-sessions-max-lifetime-renewal-etc/48739/5 "2021-04-27T16:42:32Z")

</div>

Thanks for sharing these answers @bekit ! 🙂

@cscav , let us know if you have any other questions!

-Tommy

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex016/uploads/zoomdeveloper/original/3X/6/1/614bdd549b610bbaa46ff934617683a02bdaa03c.png) [@system](https://devforum.zoom.us/u/system)\
**Post date:** [May 28, 2021, 2:43am UTC](https://devforum.zoom.us/t/auth-signatures-sessions-max-lifetime-renewal-etc/48739/6 "2021-05-28T02:43:05Z")

</div>

Closed on May 28, 2021, 2:43am UTC

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.
