livekit / server-sdk-ruby

LiveKit Server SDK for Ruby
Apache License 2.0
21 stars 15 forks source link

Default TTL time for access token seems to be wrong #52

Open Muhidin123 opened 2 months ago

Muhidin123 commented 2 months ago

In the docs it says the following By default, a token expires after 6 hours. You may override this by passing in ttl when creating the token. ttl is expressed in seconds.

But the source code doesn't really support that from what I can see ? 14_400 is 4 hours and not 6 hours ?

In source code of access_token.rb

6 hours in seconds; how long the access token to the server is good for
    DEFAULT_TTL = 14_400

Source code: https://github.com/livekit/server-sdk-ruby/blob/main/lib/livekit/access_token.rb#L8