diff --git a/tsuru/auth/oidc.go b/tsuru/auth/oidc.go index c08503a7..55f130a6 100644 --- a/tsuru/auth/oidc.go +++ b/tsuru/auth/oidc.go @@ -62,7 +62,8 @@ func oidcLogin(ctx *cmd.Context, loginInfo *authTypes.SchemeInfo) error { } fmt.Fprintln(ctx.Stderr, "Successfully logged in via OIDC!") - fmt.Fprintf(ctx.Stderr, "The OIDC token will expiry in %s\n", time.Since(t.Expiry)*-1) + tokenExpiry := time.Since(t.Expiry) * -1 + fmt.Fprintf(ctx.Stderr, "The OIDC token will expiry in %s\n", tokenExpiry.Round(time.Second)) handlerErr = config.WriteTokenV2(config.TokenV2{ Scheme: "oidc",