Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Expire in 1 year by default #185

Merged
merged 1 commit into from
Nov 14, 2016
Merged

Expire in 1 year by default #185

merged 1 commit into from
Nov 14, 2016

Conversation

themsaid
Copy link
Member

In reference to #162 and #47

100 years seems to be too long for some environments, maybe 1 year is enough?

@Modelizer
Copy link
Contributor

Will it be a better idea to set year in .env file? I think this will give more flexibility for users who wants to alter.

@hinaloe
Copy link

hinaloe commented Nov 16, 2016

Why the personal token limit static 1year?

@diazemiliano-zz
Copy link

diazemiliano-zz commented Dec 12, 2017

Hi guys, I've set the expires_at date in database to one year before now. But it seems Passport isn't checking expiration dates on personal access tokens. That's a default behavior? Thanks.

@MightyPork
Copy link

MightyPork commented Nov 8, 2018

I found this workaround for the unfortunate fixed 1 year expiry - but i didnt test if it checks or does not check the expiry time.

After creating a token:

$tokenResult = $user->createToken($name);
$tokenResult->token->expires_at = Carbon::now()->addDays($expiryDays);
$tokenResult->token->save();

it's really inconvenient to have to regenerate your tokens every year.. this way, if I understand it right, you can set any arbitrary expiry period.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants