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

Add support for GitHub as OAuth provider #706

Merged
merged 1 commit into from
Feb 26, 2023
Merged

Conversation

VMelnalksnis
Copy link
Owner

Fixes #451

@VMelnalksnis VMelnalksnis added type:enhancement New feature or request area:api labels Feb 25, 2023
@VMelnalksnis
Copy link
Owner Author

By using AspNet.Security.OAuth.GitHub the setup is quite simple, however now calls to API without any authentication details are redirected to github for sign in due to GitHubAuthenticationHandler now being present, which causes a Challenge to be returned instead of Forbidden. I guess this also would happen if I had correctly (?) added OIDC support, so probably have to finally dig in to the identity, authentication/authorization documentation.

@codecov
Copy link

codecov bot commented Feb 25, 2023

Codecov Report

Merging #706 (2c7e058) into master (c9708c0) will decrease coverage by 0.16%.
The diff coverage is 45.16%.

@@            Coverage Diff             @@
##           master     #706      +/-   ##
==========================================
- Coverage   72.38%   72.22%   -0.16%     
==========================================
  Files         218      219       +1     
  Lines        6275     6301      +26     
  Branches      407      411       +4     
==========================================
+ Hits         4542     4551       +9     
- Misses       1566     1582      +16     
- Partials      167      168       +1     
Impacted Files Coverage Δ
...bApi/Configuration/Options/OAuthProviderOptions.cs 0.00% <0.00%> (ø)
...omeshade.WebApi/Configuration/AuthConfiguration.cs 82.75% <48.27%> (-8.98%) ⬇️

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

@VMelnalksnis VMelnalksnis force-pushed the github-auth branch 4 times, most recently from 248f8d8 to afdb4e0 Compare February 26, 2023 14:40
@VMelnalksnis
Copy link
Owner Author

Could not get swagger to work with oauth2/oidc, however it is possible to simply log in and then use swagger with cookie authentication.

@VMelnalksnis VMelnalksnis merged commit 2c7e058 into master Feb 26, 2023
@VMelnalksnis VMelnalksnis deleted the github-auth branch February 26, 2023 15:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area:api type:enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add support for GitHub as OIDC provider
1 participant