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

feat: add Gitea Oauth Provider #335

Merged
merged 5 commits into from
Feb 4, 2025
Merged

feat: add Gitea Oauth Provider #335

merged 5 commits into from
Feb 4, 2025

Conversation

justserdar
Copy link
Contributor

I needed a Gitea provider for Nuxt Auth Utils, but couldn't find it, so I made it few days ago.
Came back to PR the provider, it's nearly identical to GitLab.

If I'm missing something, let me know.
I moved over to GitLab because of Gitea not being a valid giget source in Nuxt as of now.

@ManUtopiK
Copy link
Contributor

We can almost use Gitlab oauth to use Gitea.
In nuxt.config.ts :

runtimeConfig: {
    oauth: {
      gitlab: {
        authorizationURL: 'https://{{gitea_url}}/login/oauth/authorize',
        clientId: 'xxxx',
        clientSecret: 'xxxx',
        tokenURL: 'https://{{gitea_url}}/login/oauth/access_token',
      }
    }
  }

It works until server meet

const user: any = await $fetch(`${baseURL}/api/v4/user`, {

We just need to use v1 instead of v4 !

@justserdar
Copy link
Contributor Author

Nice to know! Thanks for letting me know. The Gitea provider is essentially the Gitlab provider but just preset provider via this PR.

Sadly gitea doesn't work with giget in Nuxt yet. Hope we can get that neatly upgraded too going forward!

@atinux atinux changed the title feat: Added Gitea Oauth Provider feat: add Gitea Oauth Provider Feb 4, 2025
Copy link

pkg-pr-new bot commented Feb 4, 2025

Open in Stackblitz

npm i https://pkg.pr.new/atinux/nuxt-auth-utils@335

commit: 32d56ae

@atinux atinux merged commit 32e3b47 into atinux:main Feb 4, 2025
4 checks passed
@atinux
Copy link
Owner

atinux commented Feb 5, 2025

Thank you ❤️

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

Successfully merging this pull request may close these issues.

3 participants