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

Allow user to use own userid #101

Open
scooper4711 opened this issue May 22, 2021 · 6 comments
Open

Allow user to use own userid #101

scooper4711 opened this issue May 22, 2021 · 6 comments
Assignees
Labels
Backend Having to do with changes needed on the server endpoint. enhancement New feature or request

Comments

@scooper4711
Copy link

While the "create an issue without needing a userid" thing is cool and all, I'd like to have the issues created under my own name.
This would allow for updates and just in general knowing what modules I've reported bugs against.

@Ethck
Copy link
Collaborator

Ethck commented Jun 19, 2021

Apologies for taking a while to get on this. I will look into it this weekend.

@Ethck Ethck self-assigned this Jun 19, 2021
@Ethck Ethck added the enhancement New feature or request label Jun 19, 2021
@Ethck Ethck added the Backend Having to do with changes needed on the server endpoint. label Aug 6, 2021
@scooper4711
Copy link
Author

Any update?

@Ethck
Copy link
Collaborator

Ethck commented Aug 20, 2021

Oh, totally forgot that I said I'd look into it. What I will say is that in order to implement it we would have to allow the request to the server to also include some kind of authentication from the user (in this case you'd have to provide one of Github's Personal Access Tokens). It's definitely something that is doable, but I'm going to need to check in with our server guy about it. Additionally, I've been busy as of late with other modules but do plan on getting around to a rather large update to bug reporter soon(ish). Again, apologies for the delay.

@scooper4711
Copy link
Author

scooper4711 commented Aug 20, 2021

Can't you just leverage API tokens? I assume that's what you're doing today, but with your own token.
https://github.com/settings/tokens
https://gitlab.com/-/profile/personal_access_tokens
I think if you just allow the user to specify their own tokens, then replace whatever token you're currently using with the user provided token, you'll be all set.
Oh, and of course, if the user doesn't provide a token, you default back to your current token.

@scooper4711
Copy link
Author

scooper4711 commented Aug 20, 2021

I don't know C sharp, but I assume this is the line to update to use the user's personal access token if provided:

var githubPat = Environment.GetEnvironmentVariable("GithubPAT");

and

_httpClient.DefaultRequestHeaders.Add("PRIVATE-TOKEN", Environment.GetEnvironmentVariable("GitlabPAT"));

@Ethck
Copy link
Collaborator

Ethck commented Aug 21, 2021

Everything you've said is pretty much right on the nose, it will just take slightly more time to implement since I'm working on other modules right now. In theory it's a pretty small fix, but we (me and the other devs) still need to have a conversation about whether or not this is something that we want to implement because in theory there could be some unforeseen complications.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Backend Having to do with changes needed on the server endpoint. enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants