igrigorik / vimgolf

Real Vim ninjas count every keystroke - do you?
http://www.vimgolf.com/
MIT License
672 stars 65 forks source link

[Feature] Added new OmniAuth provider GitHub #376

Closed despotes closed 1 year ago

despotes commented 1 year ago

OAuth Integration and Profile Updates

Description:

This pull request aims to enhance the Vimgolf application by introducing:

Changes

These updates enhance the user experience by providing OAuth login options and ensuring accurate profile information. The code has been thoroughly tested and is ready for review and integration into the main codebase.

Please review and merge this pull request. Thank you for your time and consideration!

stablestud commented 1 year ago

@filbranden I think this is something for you

codecov-commenter commented 1 year ago

Codecov Report

Merging #376 (8b872ae) into master (77c370d) will decrease coverage by 0.31%. The diff coverage is 83.33%.

:exclamation: Your organization is not using the GitHub App Integration. As a result you may experience degraded service beginning May 15th. Please install the Github App Integration for your organization. Read more.

@@            Coverage Diff             @@
##           master     #376      +/-   ##
==========================================
- Coverage   92.84%   92.54%   -0.31%     
==========================================
  Files          26       26              
  Lines         797      805       +8     
==========================================
+ Hits          740      745       +5     
- Misses         57       60       +3     
Impacted Files Coverage Δ
app/helpers/application_helper.rb 80.00% <60.00%> (-20.00%) :arrow_down:
app/controllers/main_controller.rb 100.00% <100.00%> (ø)
app/controllers/users_controller.rb 100.00% <100.00%> (ø)
app/services/show_profile.rb 100.00% <100.00%> (ø)
lib/vimgolf/lib/vimgolf/cli.rb 85.82% <100.00%> (+0.11%) :arrow_up:
igrigorik commented 1 year ago

Nice work, thank you!

despotes commented 1 year ago

Nice work, thank you!

Thank you @igrigorik, one importantt thing is that who has the production access needs to add the environment variables for github oauth:

provider(
    :github,
    ENV.fetch('GITHUB_OAUTH_ID', 'dev'),
    ENV.fetch('GITHUB_OAUTH_SECRET', 'dev')
  )
ic-768 commented 12 months ago

Following the vimgolf site's instructions - i.e. gem install and vimgolf setup - there is no mention of using github auth, prompting only for a twitter key.

If github auth is supported could we have some better instructions on how to use it?

despotes commented 12 months ago

Following the vimgolf site's instructions - i.e. gem install and vimgolf setup - there is no mention of using github auth, prompting only for a twitter key.

If github auth is supported could we have some better instructions on how to use it?

It seems that while the implementation for GitHub oAuth is in place, the repository owner might not have had the time to add the necessary client secret and client Id during the deployment phase. Only the repository owner @igrigorik , as far I know, can incorporate these keys securely. So, even if GitHub auth is supported in the codebase, it might not be functional until those keys are integrated.

sorry for the inconvenience