Skip to content
This repository was archived by the owner on Mar 13, 2025. It is now read-only.

[$60] Gitlab token expiration #270

Closed
jmgasper opened this issue Dec 3, 2019 · 8 comments
Closed

[$60] Gitlab token expiration #270

jmgasper opened this issue Dec 3, 2019 · 8 comments

Comments

@jmgasper
Copy link
Collaborator

jmgasper commented Dec 3, 2019

@afrisalyp - I have a report from a TC admin that their Gitlab token expires on a regular basis (every time he logs in). I haven't seen this myself - mine's been fine for at least a couple weeks now.

Is there anything you can think of that might cause this discrepancy? Do you know what the normal expiration time should be?

@jmgasper
Copy link
Collaborator Author

jmgasper commented Dec 3, 2019

Contest https://www.topcoder.com/challenges/30108782 has been created for this ticket.

This is an automated message for ghostar via Topcoder X

@jmgasper
Copy link
Collaborator Author

jmgasper commented Dec 3, 2019

Contest https://www.topcoder.com/challenges/30108782 has been updated - it has been assigned to afrisalyp.

This is an automated message for ghostar via Topcoder X

@afrisalyp
Copy link
Collaborator

@jmgasper
Github doesn't have token expiration, which means the token never expires.

But Gitlab has token expiration. By default, if we request to https://gitlab.com/oauth/token we will get results with expires_in. But sometimes for some gitlab accounts, we don't get the param. Not really sure what's the cause.

Currently, if we don't have the expires_in, we set the expires_in in only 3600 seconds.

What do you think that we should handle this?

@jmgasper
Copy link
Collaborator Author

jmgasper commented Dec 3, 2019

How far out can we set the expires_in value? A couple weeks instead of an hour would make sense.

@afrisalyp
Copy link
Collaborator

Yeah, I think two weeks is proper.
Is it acceptable?

@jmgasper
Copy link
Collaborator Author

jmgasper commented Dec 3, 2019

Yep, is that an easy change?

@afrisalyp
Copy link
Collaborator

Yes. We can change this code
https://github.com/topcoder-platform/topcoder-x-ui/blob/develop/src/common/constants.js#L46

I can raise a PR if it's needed.

@jmgasper
Copy link
Collaborator Author

jmgasper commented Dec 3, 2019

Payment task has been updated: https://software.topcoder-dev.com/review/actions/ViewProjectDetails?pid=30108782

This is an automated message for ghostar via Topcoder X

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

No branches or pull requests

2 participants