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

Added github OAuth endpoints #72

Open
wants to merge 30 commits into
base: main
Choose a base branch
from
Open

Conversation

Bikram-ghuku
Copy link
Contributor

@Bikram-ghuku Bikram-ghuku commented Jun 13, 2024

Description

Added github OAuth backend which takes in a code in JSON format and returns a JWT if user is present in the team of the org else returns 401.
The OAuth app must be made in the organisation.
The OAuth URL must be: https://github.com/login/oauth/authorize?client_id=<CLIENT_ID>&scope=read:org.

Fixes #61 (issue)

Type of change

Please delete options that are not relevant.

  • New feature (non-breaking change which adds functionality)

How Has This Been Tested?

Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. Please also list any relevant details for your test configuration

  • Created two user one part of the team and one not a part returns 401 for not authenticated and 200 for authenticated

Test Configuration:

  • Firmware version:
  • Hardware:
  • Toolchain:
  • SDK:

Checklist:

  • My code follows the style guidelines of this project
  • I have performed a self-review of my code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes
  • Any dependent changes have been merged and published in downstream modules

Copy link

vercel bot commented Jun 13, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
iqps ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jun 26, 2024 1:55pm

backend/main.go Outdated Show resolved Hide resolved
backend/main.go Outdated Show resolved Hide resolved
backend/main.go Outdated Show resolved Hide resolved
@rajivharlalka
Copy link
Member

@Bikram-ghuku it's recommended to resolve comments once you have made changes, helps in faster review.

backend/main.go Outdated Show resolved Hide resolved
backend/main.go Outdated Show resolved Hide resolved
backend/main.go Outdated Show resolved Hide resolved
backend/main.go Show resolved Hide resolved
backend/main.go Outdated Show resolved Hide resolved
Copy link
Member

@harshkhandeparkar harshkhandeparkar left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Consider it approved from my side. @rajivharlalka if you approve, please merge.

backend/main.go Outdated Show resolved Hide resolved
backend/main.go Outdated Show resolved Hide resolved
backend/main.go Show resolved Hide resolved
@proffapt
Copy link
Member

@Bikram-ghuku what's the followup on the comments by Rajiv?

@Bikram-ghuku
Copy link
Contributor Author

Should I update this to go 1.22 ?

@harshkhandeparkar
Copy link
Member

Should I update this to go 1.22 ?

Yes, please.

@rajivharlalka
Copy link
Member

rajivharlalka commented Jun 26, 2024 via email

@proffapt
Copy link
Member

@Bikram-ghuku once done, request for review from rajiv and harsh.

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.

Set up GH OAuth Backend for Admin Dashboard
4 participants