connect
connect copied to clipboard
exp / expires_in should be set to offset
when client.default_max_age is present it should be used as an offset not as a value
Not sure the change on line 106 is correct. expires_in should be a duration, not a date/time.
Ran across the same issue on line 90 with @bauglir today while pairing and we fixed it, without including your conditional logic, which I think is more accurate. I'd accept a PR if you still want to address that.
I'm very sorry this slipped through the cracks until now. We're in a difficult transition these last few months.
Old one. Re line 90, without the conditional logic with just nowSeconds(req.client.default_max_age) the token will be issued with an immediate exp time when req.client.default_max_age is undefined, which is fine as long as req.client.default_max_age is never undefined.
It is undefined at the moment for the default "client_name": "Anvil Connect CLI".
Re line 160, not sure now why I thought this should be changed as well, it may be ok as is. Sorry for leaving this this long.