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

[Revival] Support native authentication #2077

Closed
wants to merge 19 commits into from

Conversation

toniopelo
Copy link

Fixes #1098

This PR is a revival of this one from @kiprasmel, big thanks to him!

Kipras Melnikovas and others added 10 commits September 15, 2021 17:52
Fixes jdalrymple#1098

These are the issues I encountered - please help:

- [ ] fix TODOs
- [ ] lint & fix (for me, there were a lot of unrelated changes after
running lint:fix, so I didn't.)
- [ ] verify this works because I couldn't test it because of jdalrymple#1105

Signed-off-by: Kipras Melnikovas <[email protected]>
it's good that I'm able to test on other environments too
(this was needed on self-hosted GitLab Community edition)

Signed-off-by: Kipras Melnikovas <[email protected]>
@toniopelo
Copy link
Author

toniopelo commented Sep 15, 2021

Hi @jdalrymple, I've recreated a PR to have the native-auth landed.
I got the commits from @kiprasmel PR here and fixed a ts error.
As I understood the last thing that @kiprasmel wanted to do was to add some tests, I tried to give it a try but the current tests from master are failing. What should I do ?

@jdalrymple
Copy link
Owner

@toniopelo Ill give it a look! This weeks just been madness. Ill follow up ASAP

/**
* TODO - what do I do here with the additionalBody?
*
* Update: attempting to parse `body` like so:
Copy link
Owner

@jdalrymple jdalrymple Sep 29, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How is the additional information sent when there is a form data request? Should they be added to the formdata? If so this modification will probably have to happen in the specific requesters (Ky and Got) because they handle formdata differently

Copy link
Contributor

@kiprasmel kiprasmel Sep 29, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

hmm i probably never encountered this case or something because it was never an issue, but how to solve it - no clue..

edit: nvm, i remember that when i tried changing it (like u can see in the remaining comment) it broke things, and the current solution works. dunno why/how tho

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Did you ever try to import or export projects using the api? Thats really the only time the formdata is called on.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nope, only used gitbeaker inside my own extension [1] but nowhere else..

[1] http://github.com/kiprasmel/refined-gitlab

@jdalrymple
Copy link
Owner

Unit tests are good, everything seems to work BUT, i want to make sure the integration tests are good to go. Give me a little more time to fix up the pipeline 🙏

@jdalrymple
Copy link
Owner

jdalrymple commented Oct 16, 2021

Unit tests are good, everything seems to work BUT, i want to make sure the integration tests are good to go. Give me a little more time to fix up the pipeline pray

Glad i waited. When performing get requests, are these new properties still included in the body OR are they sent via query parameters? Is the header argument not sufficient enough? Why pass it through the body at all?

@toniopelo @kiprasmel

@jdalrymple
Copy link
Owner

Following up on my last question, anyone?

@toniopelo
Copy link
Author

Sorry @jdalrymple I lost momentum on this one. I'm unfortunately overbooked lastly but I'll try my best to give it some times in the following weeks. If @kiprasmel feels like doing it, you can obviously close my PR and reopen the old one (or continue on this one but not sure of the push rights on my branch). Really sorry guys 🙏

@jdalrymple
Copy link
Owner

No worries! Take your time.

@jdalrymple jdalrymple deleted the branch jdalrymple:master April 26, 2023 18:01
@jdalrymple jdalrymple closed this Apr 26, 2023
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.

[FR] Allow authenticating via session cookie + csrf key & csrf token
3 participants