Codeberg/Community
54
325
Fork
You've already forked Community
12

add GitHub and GitLab as Oauth2 sources #225

Closed
opened 2020年07月27日 21:07:55 +02:00 by 6543 · 21 comments

this would make migration from GitHub/GitLab eaven easyer: user who have created an accounton Codeberg and linked this one with a GitHub account later, will automaticaly take over the ownership of issues/pulls/comments on repos witch had used the build-in Migration tool.

this would make migration from GitHub/GitLab eaven easyer: user who have created an accounton Codeberg and linked this one with a GitHub account later, will automaticaly take over the ownership of issues/pulls/comments on repos witch had used the build-in Migration tool.

@6543

Personally I would like to support linking the account for issue/pulls/comments migration.

But I would like to do it without enabling "login/register with github". Accounts created that way behaved weird in our and tests by @davidak .

It that possible?

@6543 Personally I would like to support linking the account for issue/pulls/comments migration. But I would like to do it **without** enabling "login/register with github". Accounts created that way behaved weird in our and tests by @davidak . It that possible?
Author
Copy link

Accounts created that way behaved weird

Noticed too, there is somehow a diffrence if you create fia github or link an account afterwards - but didn't digged into this rabit hole jet

... posible without enabling ... github login ...

sadly: NO

this is the general problem of how to make sure that someone realy own the account X on platform Y

> Accounts created that way behaved weird Noticed too, there is somehow a diffrence if you create fia github or link an account afterwards - but didn't digged into this rabit hole jet > ... posible without enabling ... github login ... sadly: NO this is the general problem of how to make sure that someone realy own the account X on platform Y

Noticed too, there is somehow a diffrence if you create fia github or link an account afterwards - but didn’t digged into this rabit hole jet

Yes, this is what I mean, I would like to disable "create via github" but keep "link account afterwards". A patch for gitea/codeberg would be neccessary I guess.

> Noticed too, there is somehow a diffrence if you create fia github or link an account afterwards - but didn’t digged into this rabit hole jet Yes, this is what I mean, I would like to disable "create via github" but keep "link account afterwards". A patch for gitea/codeberg would be neccessary I guess.
Author
Copy link

@ashimokawa if we like to get it with v1.12.x I think a patch will be needed :/

@ashimokawa if we like to get it with v1.12.x I think a patch will be needed :/
Author
Copy link
upstream issue: https://github.com/go-gitea/gitea/issues/12342
Author
Copy link
upstream pull: https://github.com/go-gitea/gitea/pull/15795
Author
Copy link

ok did we come to the conclusion it's working fine ...?

can be tested on https://codeberg-test.org/ atm :D

ok did we come to the conclusion it's working fine ...? can be tested on https://codeberg-test.org/ atm :D
Owner
Copy link

Think so, missing thing is some explanation in the docs on how to connect?

Think so, missing thing is some explanation in the docs on how to connect?
Author
Copy link

well thinks so,

jut the hint we have to make sure...:

  • Github oauth authentification source has te be named github
  • Gitlab oauth authentification source has te be named gitlab
well thinks so, jut the hint we have to make sure...: * Github oauth authentification source has te be named `github` * Gitlab oauth authentification source has te be named `gitlab`
Author
Copy link

INFO: Codeberg/gitea@0d3874b691 will make it posible, on next deploy 🚀

INFO: https://codeberg.org/Codeberg/gitea/commit/0d3874b6914e512eb9a9b5c48888f6a9c023a2f8 will make it posible, on next deploy :rocket:

I tried to test this and failed, maybe at the CAPTCHA. #483

This would help a lot to convince projects to migrate to codeberg as their users can still contribute easily with github/gitlab account.

I tried to test this and failed, maybe at the CAPTCHA. https://codeberg.org/Codeberg/Community/issues/483 This would help a lot to convince projects to migrate to codeberg as their users can still contribute easily with github/gitlab account.
Owner
Copy link

I don't know if the login sources are setup properly yet or maybe broken? Testing this is highly appreciated before we rollout to prod, I'm not sure about the current state.

We'll hit this issue up as soon as we get to this topic again ...

I don't know if the login sources are setup properly yet or maybe broken? Testing this is highly appreciated before we rollout to prod, I'm not sure about the current state. We'll hit this issue up as soon as we get to this topic again ...
Author
Copy link

It should work all fine?

What do you rever to @fnetX ?

It should work all fine? What do you rever to @fnetX ?

It should work all fine?

have you tested it? shouldn't take too long

it fails for me

steps to reproduce:

  1. don't have an account on the test instance
  2. open https://codeberg-test.org/user/login
  3. click Sign In With GitHub
  4. the page "Link to Existing Account" (https://codeberg-test.org/user/link_account) opens
  5. i don't have an account, so i input random characters and click Link account
  6. then i get to the page https://codeberg-test.org/user/link_account_signin where i click the option Register New Account (i don't see it on the first site)
  7. i input my user name (davidak), e-mail und captcha and click "Complete Account"
  8. i get a white page with the text "Forbidden"

the browser console (Chromium 91.0.4472.114) says:

Error with Permissions-Policy header: Unrecognized feature: 'interest-cohort'.
link_account_signup:1 POST https://codeberg-test.org/user/link_account_signup 403

here is a video that shows the issue and how it works on https://try.gitea.io/

https://peertube.social/videos/watch/eaf0278a-f14c-4018-83cc-0c2a3706dea6

>It should work all fine? have you tested it? shouldn't take too long it fails for me steps to reproduce: 0. don't have an account on the test instance 1. open https://codeberg-test.org/user/login 2. click *Sign In With GitHub* 3. the page "Link to Existing Account" (https://codeberg-test.org/user/link_account) opens 4. i don't have an account, so i input random characters and click *Link account* 5. then i get to the page https://codeberg-test.org/user/link_account_signin where i click the option *Register New Account* (i don't see it on the first site) 6. i input my user name (davidak), e-mail und captcha and click "Complete Account" 7. i get a white page with the text "Forbidden" the browser console (Chromium 91.0.4472.114) says: > Error with Permissions-Policy header: Unrecognized feature: 'interest-cohort'. > link_account_signup:1 POST https://codeberg-test.org/user/link_account_signup 403 here is a video that shows the issue and how it works on https://try.gitea.io/ https://peertube.social/videos/watch/eaf0278a-f14c-4018-83cc-0c2a3706dea6
Owner
Copy link

Yeah this isn't the supposed workflow. It's not described, because it's not on prod yet.

You have to register an account first, then sign-in with GitHub and link it.

Maybe this can be changed, but it's not the way it's supposed to work.

It's at least a bug that you see the sign-up tab after entering non-working credentials ...

Yeah this isn't the supposed workflow. It's not described, because it's not on prod yet. You have to register an account first, then sign-in with GitHub and link it. Maybe this can be changed, but it's not the way it's supposed to work. It's at least a bug that you see the sign-up tab after entering non-working credentials ...

whats the point in "sign in with github" if i need to register locally anyway?

whats the point in "sign in with github" if i need to register locally anyway?
Owner
Copy link

You can link your account with migrated content. The issues do not longer show some random GitHub user, but your account etc ...

If possible, I personally don't object to logging in with GitHub, but we had issues with having access to the users mail address IIRC ...

You can link your account with migrated content. The issues do not longer show some random GitHub user, but your account etc ... If possible, I personally don't object to logging in with GitHub, but we had issues with having access to the users mail address IIRC ...
Author
Copy link

hmm https://codeberg-test.org/user/link_account_signin should return 404 or better redirect to normal signup

hmm `https://codeberg-test.org/user/link_account_signin` should return 404 or better redirect to normal signup
Author
Copy link

done 🚀

done 🚀

It works now to link an existing account.

Tested on https://codeberg-test.org/.

Would be great if one could create an account just from GitHub login. So UX would be:

  1. Click "Login with GitHub"
  2. Allow to use user data from GitHub
  3. You are logged in with your new account

It uses the e-mail github has and you can reset your password with that address if github would disappear.

It works now to link an existing account. Tested on https://codeberg-test.org/. Would be great if one could create an account just from GitHub login. So UX would be: 1. Click "Login with GitHub" 2. Allow to use user data from GitHub 2. You are logged in with your new account It uses the e-mail github has and you can reset your password with that address if github would disappear.
Author
Copy link

@davidak another issue - "enable auto account creation on oauth login" ... ;)

@davidak another issue - "enable auto account creation on oauth login" ... ;)
Sign in to join this conversation.
No Branch/Tag specified
main
No results found.
Labels
Clear labels
accessibility

Reduces accessibility and is thus a "bug" for certain user groups on Codeberg.
bug

Something is not working the way it should. Does not concern outages.
bug
infrastructure

Errors evidently caused by infrastructure malfunctions or outages
Codeberg

This issue involves Codeberg's downstream modifications and settings and/or Codeberg's structures.
contributions welcome

Please join the discussion and consider contributing a PR!
docs

No bug, but an improvement to the docs or UI description will help
duplicate

This issue or pull request already exists
enhancement

New feature
infrastructure

Involves changes to the server setups, use `bug/infrastructure` for infrastructure-related user errors.
legal

An issue directly involving legal compliance
licence / ToS

involving questions about the ToS, especially licencing compliance
please chill
we are volunteers

Please consider editing your posts and remember that there is a human on the other side. We get that you are frustrated, but it's harder for us to help you this way.
public relations

Things related to Codeberg's external communication
question

More information is needed
question
user support

This issue contains a clearly stated problem. However, it is not clear whether we have to fix anything on Codeberg's end, but we're helping them fix it and/or find the cause.
s/Forgejo

Related to Forgejo. Please also check Forgejo's issue tracker.
s/Forgejo/migration

Migration related issues in Forgejo
s/Pages

Issues related to the Codeberg Pages feature
s/Weblate

Issue is related to the Weblate instance at https://translate.codeberg.org
s/Woodpecker

Woodpecker CI related issue
security

involves improvements to the sites security
service

Add a new service to the Codeberg ecosystem (instead of implementing into Gitea)
upstream

An open issue or pull request to an upstream repository to fix this issue (partially or completely) exists (i.e. Gitea, Forgejo, etc.)
wontfix

Codeberg's current set of contributors are not planning to spend time on delegating this issue.
Milestone
Clear milestone
No items
No milestone
Projects
Clear projects
No items
No project
Assignees
Clear assignees
No assignees
5 participants
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
Codeberg/Community#225
Reference in a new issue
Codeberg/Community
No description provided.
Delete branch "%!s()"

Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?