[GH-ISSUE #279] JWT Token expiration #249

Closed
opened 2026-02-26 06:31:44 +03:00 by kerem · 4 comments
Owner

Originally created by @dejecj on GitHub (Jan 26, 2020).
Original GitHub issue: https://github.com/NginxProxyManager/nginx-proxy-manager/issues/279

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.

Originally created by @dejecj on GitHub (Jan 26, 2020). Original GitHub issue: https://github.com/NginxProxyManager/nginx-proxy-manager/issues/279 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.
kerem closed this issue 2026-02-26 06:31:44 +03:00
Author
Owner

@jc21 commented on GitHub (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.

<!-- gh-comment-id:578998365 --> @jc21 commented on GitHub (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.
Author
Owner

@dejecj commented on GitHub (Jan 27, 2020):

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

<!-- gh-comment-id:579007660 --> @dejecj commented on GitHub (Jan 27, 2020): @jc21 Ok thanks, I'll also look at the source and I'll let you know if I see anything.
Author
Owner

@dejecj commented on GitHub (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

<!-- gh-comment-id:579023112 --> @dejecj commented on GitHub (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**
Author
Owner

@jc21 commented on GitHub (Jan 29, 2020):

Awesome work. I'll get that fixed soon

<!-- gh-comment-id:579574810 --> @jc21 commented on GitHub (Jan 29, 2020): Awesome work. I'll get that fixed soon
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/nginx-proxy-manager-NginxProxyManager#249
No description provided.