Oauth2 provider: user end point not documented. User API url & scope keys? #3857

Closed
opened 2025-11-02 05:28:33 -06:00 by GiteaMirror · 3 comments
Owner

Originally created by @poVoq on GitHub (Aug 27, 2019).

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

Description

Oauth2 provider: user end point not documented. User API url & scope keys?

I would like to enable login via Gitea Oauth2 provider in my Kanboard instance with this Kanboard plugin:
https://github.com/kanboard/plugin-oauth2
It authorizes fine, but since I can not find any documentation on what to fill for User API URL and the individual scope keys it fails to create an user.

Might be related to this:
https://github.com/go-gitea/gitea/pull/5123

Thanks for looking into this!

Originally created by @poVoq on GitHub (Aug 27, 2019). - Gitea version (or commit ref): 1.9.2 - Git version: ? - Operating system: Docker - Database (use `[x]`): - [ ] PostgreSQL - [x] MySQL - [ ] MSSQL - [ ] SQLite - Can you reproduce the bug at https://try.gitea.io: - [ ] Yes (provide example URL) - [ ] No - [x] Not relevant ## Description Oauth2 provider: user end point not documented. User API url & scope keys? I would like to enable login via Gitea Oauth2 provider in my Kanboard instance with this Kanboard plugin: https://github.com/kanboard/plugin-oauth2 It authorizes fine, but since I can not find any documentation on what to fill for User API URL and the individual scope keys it fails to create an user. Might be related to this: https://github.com/go-gitea/gitea/pull/5123 Thanks for looking into this!
GiteaMirror added the type/question label 2025-11-02 05:28:33 -06:00
Author
Owner

@lunny commented on GitHub (Aug 28, 2019):

Here is my example via Golang https://gitea.com/lunny/testGiteaOauth2

@lunny commented on GitHub (Aug 28, 2019): Here is my example via Golang https://gitea.com/lunny/testGiteaOauth2
Author
Owner

@techknowlogick commented on GitHub (Aug 28, 2019):

Once you have an oauth2 token you can use that to request any API. I suspect you want the information from the /api/v1/user endpoint, as that is what several libraries use in your situation (example: https://github.com/markbates/goth/blob/master/providers/gitea/gitea.go#L28 )

Please open a discussion on the forum, if you have additional questions: https://discourse.gitea.io/

@techknowlogick commented on GitHub (Aug 28, 2019): Once you have an oauth2 token you can use that to request any API. I suspect you want the information from the /api/v1/user endpoint, as that is what several libraries use in your situation (example: https://github.com/markbates/goth/blob/master/providers/gitea/gitea.go#L28 ) Please open a discussion on the forum, if you have additional questions: https://discourse.gitea.io/
Author
Owner

@poVoq commented on GitHub (Aug 28, 2019):

/api/v1/user works!
Trying with is now from the link above:

		Name      string `json:"full_name"`
		Email     string `json:"email"`
		NickName  string `json:"login"`
		ID        int    `json:"id"`

Edit: that seems to work in Kanboard. Would be nice it that was added to the documentation.

@poVoq commented on GitHub (Aug 28, 2019): /api/v1/user works! Trying with is now from the link above: ``` Name string `json:"full_name"` Email string `json:"email"` NickName string `json:"login"` ID int `json:"id"` ``` Edit: that seems to work in Kanboard. Would be nice it that was added to the documentation.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/gitea#3857