Skip to content

Commit fa7879d

Browse files
aleDszjonatanklosko
authored andcommitted
Fix current timestamp
1 parent 8a53dce commit fa7879d

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

lib/livebook/zta/livebook_teams.ex

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,6 @@ defmodule Livebook.ZTA.LivebookTeams do
88

99
@behaviour NimbleZTA
1010

11-
@exp_timestamp_sec System.os_time(:second) + 3 * 3600
12-
1311
@impl NimbleZTA
1412
def child_spec(opts) do
1513
%{id: __MODULE__, start: {__MODULE__, :start_link, [opts]}}
@@ -61,7 +59,7 @@ defmodule Livebook.ZTA.LivebookTeams do
6159
with {:ok, access_token} <- retrieve_access_token(team, code),
6260
{:ok, payload} <- Teams.Requests.get_user_info(team, access_token) do
6361
metadata = build_metadata(team.id, payload)
64-
:ets.insert(__MODULE__, {access_token, {@exp_timestamp_sec, metadata}})
62+
:ets.insert(__MODULE__, {access_token, {System.os_time(:second) + 3 * 3600, metadata}})
6563

6664
{conn
6765
|> put_session(:livebook_teams_access_token, access_token)

0 commit comments

Comments
 (0)