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

[How-to] Add Codeberg (and Gitea theoraticly too) as custom Oauth2 login provider #440

Closed
SadmL opened this issue Dec 6, 2023 · 0 comments

Comments

@SadmL
Copy link
Contributor

SadmL commented Dec 6, 2023

This is not is actual issue, it's more like how-to. I can't find any sort of wiki here, so I decided to put information here, because also I couldn't find any info about it via search engines.
What is helped - https://forgejo.codeberg.page/docs/latest/user/oauth2-provider/

  1. Create app in Codeberg and copy Client ID and Client secret somewhere.
  2. Go to your Nextcloud Admin settings,Social Login section, and create Custom Oauth2 provider.
Section What to enter
Local/inner name Codeberg
Name Codeberg
API Base URL https://codeberg.org
Authorize url (relative doesn't work for some reason 🤷) https://codeberg.org/login/oauth/authorize
Token url https://codeberg.org/login/oauth/access_token
Profile url https://codeberg.org/login/oauth/userinfo
Logout url leave empty
Client ID and Client secret paste from step 1
Scope read:user
Other after leave empty if not sure
  1. Tick Allow users to attach/connect their social logins box and click Save in the bottom of page.
  2. Go in Incognito/Private window of your browser, go to your Nextcloud login page and copy path of Codeberg provider - Right click, copy link, save somewhere.
    Must look like this - https://cloud.example.org(/index.php)/apps/sociallogin/custom_oauth2/Codeberg
  3. Go back to your created earlier Codeberg application, click Edit button and paste link from step 4 into Redirection URI section, click Save.
  4. And you done! Try connect your Codeberg account to Nextcloud account from user settings Social Login section, it must work.

If you notice some misspelling here, I'm sorry, I'm not native English speaker 😅

@SadmL SadmL changed the title [How-to] Add Codeberg as custom Oauth2 login provider [How-to] Add Codeberg (and Gitea theoraticly too) as custom Oauth2 login provider Dec 6, 2023
@SadmL SadmL closed this as completed Jan 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant