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

JWT Token expiration #279

Closed
dejecj opened this issue Jan 26, 2020 · 4 comments · Fixed by #293
Closed

JWT Token expiration #279

dejecj opened this issue Jan 26, 2020 · 4 comments · Fixed by #293

Comments

@dejecj
Copy link

dejecj commented Jan 26, 2020

I have a question about the access tokens issued by the api. It doesn't seem like they expire. Is this right? I am trying to integrate the manager into my own web app to seamlessly add hosts and generate SSLs but I can't figure out how to get the token to issue with an expiration from the REST endpoint "/token". The payload contains a secret and identity property and tried adding the "expiry" property which returns an "expires" property with the value I would expect but the token keeps functioning after that expires date has passed.

I know this might me outside the scope of how you want the manager to be used but it would be a great help if someone could point me in the right direction. Thanks.

@jc21
Copy link
Member

jc21 commented Jan 27, 2020

I just inspected my JWT and there should have been an expiration time on it - and it's gone. I'll have to look in to this further.

@dejecj
Copy link
Author

dejecj commented Jan 27, 2020

@jc21 Ok thanks, I'll also look at the source and I'll let you know if I see anything.

@dejecj
Copy link
Author

dejecj commented Jan 28, 2020

@jc21 I think I found the issue, It looks like the token model's create method is expecting the second parameter to have an object with a property called expires but it's actually receiving an object with a property called expiresIn from the method getTokenFromEmail

@jc21
Copy link
Member

jc21 commented Jan 29, 2020

Awesome work. I'll get that fixed soon

@jc21 jc21 mentioned this issue Feb 19, 2020
@jc21 jc21 closed this as completed in #293 Feb 19, 2020
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 a pull request may close this issue.

2 participants