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

Unable to sign in when gitea url has postfix #13

Closed
MokhamedDakhraui opened this issue Jun 26, 2019 · 4 comments

Comments

@MokhamedDakhraui
Copy link

commented Jun 26, 2019

Describe the bug
Unable to sign in to account when gitea located in subfolder (e.g. http://server.org/gitea/).

To Reproduce
Steps to reproduce the behavior:

  1. Host gitea in subfolder (http://server.org/gitea/)
  2. In gitea vs extension enter url (http://server.org/gitea/), login and password of existing gitea user
  3. Click on 'Login'
  4. See error 'Login failed'

Expected behavior
Successfully logged in

Desktop (please complete the following information):

  • OS: [e.g. windows 7]
  • VS 2019 16.1.3

Additional context information:
Located cause of such behavior:

private static API.v1.Client CreateClient(string host, string email, string password)
{
var uri = new Uri(host);
API.v1.Client client = new API.v1.Client(email, password, uri.Host, uri.Port, uri.Scheme.EndsWith("s", true, null));
return client;
}

After host (http://server.org/gitea/) had been parsed to Uri, it's used only Host (server.org) to create client used for log in

In api client created by composing host and port from arguments so log-in operation performed with url http://server.org/ and ended up being failure
https://github.com/maikebing/gitea.net/blob/0010f56c0cdb82656bae26523e7afc3429aba43d/Gitea.API/v1/Client.cs#L198-L200

@maikebing

This comment has been minimized.

Copy link
Owner

commented Jun 26, 2019

Can you give me a test account and address?

@bushadam

This comment has been minimized.

Copy link

commented Jul 23, 2019

i get seam bug,the gitea server with nginx
url is https://server/gitea/
login error

maikebing added a commit that referenced this issue Jul 24, 2019

@maikebing

This comment has been minimized.

@bushadam

This comment has been minimized.

Copy link

commented Jul 24, 2019

@maikebing thx,the new version work fine for me.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants
You can’t perform that action at this time.