Nextcloud as OAuth2-Provider? #4981

Closed
opened 2025-11-02 06:09:59 -06:00 by GiteaMirror · 1 comment
Owner

Originally created by @githubkoma on GitHub (Mar 1, 2020).

Dear Team,

great work for gitea!

Is there any chance that besides the many other OAuth2-Providers, also Nextcloud could be used/implemented?

I already tried to use the GitLab-OAuth2-Template, but that fails because of the following:

  1. This is the first not-working step when getting the user object, as the token is sent as URL-Parameter instead of Bearer-Token in Header:

oauth2 gitea not working

In Comparison how it looks like for Rocket.Chat as OAuth client, where it works:

oauth2 rocketchat working

  1. This is the JSON String that the user-endpoint of nextcloud sends back if authenticated successfuly (i am not sure if the escapes in storageLocation are because of extracting this from wireshark..):
{"ocs":{"meta":{"status":"ok","statuscode":200,"message":"OK"},"data":{"storageLocation":"\/var\/www\/html\/data\/dummy","id":"dummy","lastLogin":1583084839000,"backend":"LDAP","subadmin":["self-registered"],"quota":{"free":2832472,"used":12896168,"total":15728640,"relative":81.99,"quota":15728640},"email":"dummy@gmail.com","phone":"","address":"","website":"","twitter":"","groups":["paid-users"],"language":"en","locale":"","backendCapabilities":{"setDisplayName":false,"setPassword":true},"display-name":"dummy"}}}
Originally created by @githubkoma on GitHub (Mar 1, 2020). Dear Team, great work for gitea! Is there any chance that besides the many other OAuth2-Providers, also Nextcloud could be used/implemented? I already tried to use the GitLab-OAuth2-Template, but that fails because of the following: 1) This is the first not-working step when getting the user object, as the token is sent as URL-Parameter instead of Bearer-Token in Header: ![oauth2 gitea not working](https://user-images.githubusercontent.com/5107805/75631231-66503580-5bf1-11ea-9d73-cc966b8caee8.PNG) In Comparison how it looks like for Rocket.Chat as OAuth client, where it works: ![oauth2 rocketchat working](https://user-images.githubusercontent.com/5107805/75631217-52a4cf00-5bf1-11ea-8e99-1a021d30d14b.PNG) 2) This is the JSON String that the user-endpoint of nextcloud sends back if authenticated successfuly (i am not sure if the escapes in storageLocation are because of extracting this from wireshark..): ``` {"ocs":{"meta":{"status":"ok","statuscode":200,"message":"OK"},"data":{"storageLocation":"\/var\/www\/html\/data\/dummy","id":"dummy","lastLogin":1583084839000,"backend":"LDAP","subadmin":["self-registered"],"quota":{"free":2832472,"used":12896168,"total":15728640,"relative":81.99,"quota":15728640},"email":"dummy@gmail.com","phone":"","address":"","website":"","twitter":"","groups":["paid-users"],"language":"en","locale":"","backendCapabilities":{"setDisplayName":false,"setPassword":true},"display-name":"dummy"}}} ```
GiteaMirror added the issue/duplicate label 2025-11-02 06:09:59 -06:00
Author
Owner

@techknowlogick commented on GitHub (Mar 1, 2020):

Closing as dupe of #7078

@techknowlogick commented on GitHub (Mar 1, 2020): Closing as dupe of #7078
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/gitea#4981