OpenID not working in Gitea 1.2.3 #1234

Closed
opened 2025-11-02 03:53:16 -06:00 by GiteaMirror · 7 comments
Owner

Originally created by @andreacappelli on GitHub (Nov 11, 2017).

  • Gitea version (or commit ref): 1.2.3
  • Git version: 2.11
  • Operating system: Debian Jessie
  • Database (use [x]):
    • PostgreSQL
    • MySQL
    • MSSQL
    • SQLite
  • Can you reproduce the bug at https://try.gitea.io:
    • Yes (provide example URL)
    • No
    • Not relevant
  • Log gist:

Description

Hi,
I have a running Gitea instance from commit 5c29b0a5fe

I tried to upgrade to release 1.2.3 to avoid and error 500 when rendering the "code" tab of a repository (error was [...routers/repo/view.go:53 renderDirectory()] [E] GetCommitsInfo: exit status 128 - fatal: bad revision '5d03440f3f28e7a4caddcb8a1b18b9315bf2ee5a^')

The new release didn't have this error, but now I'm not able to login via OpenID (working well on commit 5c29b0a5fe)

I set my OpenID server in debug mode and I see a difference in the data sent after the OpenID resource is chosen

  1. With commit 5c29b0a5fe the OpenID server receives

{u'openid.ns': u'http://specs.openid.net/auth/2.0', u'openid.realm': u'https://MY_GITEA_URL', u'openid.return_to': u'https://MY_GITEA_URL/user/login/openid', u'openid.ns.sreg': u'http://openid.net/extensions/sreg/1.1', u'openid.sreg.optional': u'nickname,email', u'openid.claimed_id': u'https://MY_OPENID_URL/id/USERNAME', u'openid.mode': u'checkid_setup', u'openid.identity': u'https://MY_OPENID_URL/id/USERNAME'}

  1. With release 1.2.x (I tried all version) the OpenID server receives

{u'openid.ns': u'http://specs.openid.net/auth/2.0', u'openid.realm': u'https://MY_GITEA_URL/', u'openid.return_to': u'https://MY_GITEA_URL/user/login/openid', u'openid.ns.sreg': u'http://openid.net/extensions/sreg/1.1', u'openid.sreg.optional': u'nickname,email', u'openid.claimed_id': u'http://specs.openid.net/auth/2.0/identifier_select', u'openid.mode': u'checkid_setup', u'openid.identity': u'http://specs.openid.net/auth/2.0/identifier_select'}

So I think openid_claimed_id and identity are wrong with the new Gitea release

There is some setting that I can change or it's a bug?

Originally created by @andreacappelli on GitHub (Nov 11, 2017). - Gitea version (or commit ref): 1.2.3 - Git version: 2.11 - Operating system: Debian Jessie - Database (use `[x]`): - [x] PostgreSQL - [ ] MySQL - [ ] MSSQL - [ ] SQLite - Can you reproduce the bug at https://try.gitea.io: - [ ] Yes (provide example URL) - [ ] No - [x] Not relevant - Log gist: ## Description Hi, I have a running Gitea instance from commit 5c29b0a5fe1a124572ccaa55bd79fee2ce894253 I tried to upgrade to release 1.2.3 to avoid and error 500 when rendering the "code" tab of a repository (error was [...routers/repo/view.go:53 renderDirectory()] [E] GetCommitsInfo: exit status 128 - fatal: bad revision '5d03440f3f28e7a4caddcb8a1b18b9315bf2ee5a^') The new release didn't have this error, but now I'm not able to login via OpenID (working well on commit 5c29b0a5fe1a124572ccaa55bd79fee2ce894253) I set my OpenID server in debug mode and I see a difference in the data sent after the OpenID resource is chosen 1) With commit 5c29b0a5fe1a124572ccaa55bd79fee2ce894253 the OpenID server receives {u'openid.ns': u'http://specs.openid.net/auth/2.0', u'openid.realm': u'https://MY_GITEA_URL', u'openid.return_to': u'https://MY_GITEA_URL/user/login/openid', u'openid.ns.sreg': u'http://openid.net/extensions/sreg/1.1', u'openid.sreg.optional': u'nickname,email', u'openid.claimed_id': u'https://MY_OPENID_URL/id/USERNAME', u'openid.mode': u'checkid_setup', u'openid.identity': u'https://MY_OPENID_URL/id/USERNAME'} 2) With release 1.2.x (I tried all version) the OpenID server receives {u'openid.ns': u'http://specs.openid.net/auth/2.0', u'openid.realm': u'https://MY_GITEA_URL/', u'openid.return_to': u'https://MY_GITEA_URL/user/login/openid', u'openid.ns.sreg': u'http://openid.net/extensions/sreg/1.1', u'openid.sreg.optional': u'nickname,email', u'openid.claimed_id': u'http://specs.openid.net/auth/2.0/identifier_select', u'openid.mode': u'checkid_setup', u'openid.identity': u'http://specs.openid.net/auth/2.0/identifier_select'} So I think openid_claimed_id and identity are wrong with the new Gitea release There is some setting that I can change or it's a bug?
GiteaMirror added the type/question label 2025-11-02 03:53:16 -06:00
Author
Owner

@lunny commented on GitHub (Nov 12, 2017):

@strk could you confirm this issue?

@lunny commented on GitHub (Nov 12, 2017): @strk could you confirm this issue?
Author
Owner

@strk commented on GitHub (Nov 13, 2017):

Cannot check before a month, sorry.
Andrea, why try.gitea.io is irrelevant ? It does have OpenID enabled.
Does it work there ?
If so, would "master" branch work for you ?
This would help figuring out if it's just a problem with the 1.2
branch

@strk commented on GitHub (Nov 13, 2017): Cannot check before a month, sorry. Andrea, why try.gitea.io is irrelevant ? It does have OpenID enabled. Does it work there ? If so, would "master" branch work for you ? This would help figuring out if it's just a problem with the 1.2 branch
Author
Owner

@strk commented on GitHub (Nov 13, 2017):

OpenID works for me as of 09bd05732d
(current tip of the release/v1.2 branch)

@strk commented on GitHub (Nov 13, 2017): OpenID works for me as of 09bd05732de61930c99509ee5a25816895f430a8 (current tip of the release/v1.2 branch)
Author
Owner

@andreacappelli commented on GitHub (Nov 13, 2017):

@strk I didn't try try.gitea.io because my OpenID server is not publicly available, so I can't test it

I'm recompiling 09bd057 to test it

With which OpenID server do you try it?

@andreacappelli commented on GitHub (Nov 13, 2017): @strk I didn't try try.gitea.io because my OpenID server is not publicly available, so I can't test it I'm recompiling 09bd057 to test it With which OpenID server do you try it?
Author
Owner

@andreacappelli commented on GitHub (Nov 13, 2017):

@strk seems that gitea has nothing to do with my issue, the problem is in th elibrary openid-go or in my OpenID server

Which OpenID server do you use for your test?

@andreacappelli commented on GitHub (Nov 13, 2017): @strk seems that gitea has nothing to do with my issue, the problem is in th elibrary openid-go or in my OpenID server Which OpenID server do you use for your test?
Author
Owner

@strk commented on GitHub (Nov 14, 2017):

Which OpenID server do you use for your test?

SimpleID

@strk commented on GitHub (Nov 14, 2017): > Which OpenID server do you use for your test? SimpleID
Author
Owner

@andreacappelli commented on GitHub (Nov 14, 2017):

SimpleID

Thank you @strk

@andreacappelli commented on GitHub (Nov 14, 2017): > SimpleID Thank you @strk
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/gitea#1234