-
Notifications
You must be signed in to change notification settings - Fork 228
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 QQ provider #86
Open
bealking
wants to merge
116
commits into
Sorcery:master
Choose a base branch
from
bealking:master
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Add QQ provider #86
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
CI against Ruby 2.2.8/2.3.5/2.4.2
* add new ArgumentError for not defined user_class in config * updated grammar
Most users use BCrypt and don't change defaults, which means that the default value would be 10. That makes tests run slowly. Setting the number of stretches in test env to 1 can decrease the test suite up to 2x times (although BCrypt minimal cost is 4, we can use 1 for SHA algorithms).
* Add magic login feature * Use `.nil?` instead of `== nil` * Prepare for setting up database - create a migration file for spec - create a spec to be run and a shared_expmple file * Add configration tests change the default of `@magic_login_mailer_disabled` into true because the default breaks the tests * Change the configuration key, magic_login_mailer into magic_login_mailer_class * Add specs of `.generate_magic_login_token` * Add specs of `.clear_magic_login_token` * Add faliure case specs of `.magic_login_email` * Add success case specs of `.magic_login_email` * Refactoring: split the success case of the `.generate_magic_login_token` spec into two * Fix posix compliance offence: No newline at end of file
Another choice of implemention is like this: ``` @model.class.find_by(:"#{primary_key}" => @model.send(:"#{primary_key}")).update(attrs) ``` but for some reasons I don't adopt it. First it makes 2 queries instead of one. Secondly it has potential risk to race conditions.
Added PR Sorcery#99 and removed duplicate entry for PR Sorcery#100
* Add rubocop config and todo * Update changelog.md
Sorcery#109) * Add required version parameter when requesting user information from vk provider [fix Sorcery#108] Seems like now vk provider requires v (version) parameter to be present when calling their API: ``` curl -XGET https://api.vk.com/method/getProfiles\?user_id\=1 => {"error":{"error_code":8,"error_msg":"Invalid request: v (version) is required","request_params":[{"key":"oauth","value":"1"},{"key":"method","value":"getProfiles"},{"key":"user_id","value":"1"}]}} curl -XGET https://api.vk.com/method/getProfiles\?user_id\=1\&v\=5.71 {"response":[{"id":1,"first_name":"Павел","last_name":"Дуров"}]} ``` * Developer can specify vk API version in sorcery config [Sorcery#108] * Fix indentation * Extract authorize with vk request stub into a method * Add VK api version to the sorcery initializer template [Sorcery#108] * Update changelog.md
[CI] Test against Ruby 2.5
* Add access_count_to_reset_password_page to migration/reset_password.rb * Add #increment_password_reset_page_access_counter and #reset_password_reset_page_access_counter. * Add #increment_password_reset_page_access_counter and #reset_password_reset_page_access_counter * Add test suites related to #increment_password_reset_page_access_counter and #reset_password_reset_page_access_counter. * Refactor `#increment_password_reset_page_access_counter` Change manual increment into using Sorcery::Adapters::ActiveRecordAdapter.increment.
* Add the request spec helper method, #login_user. * Fix codacy failure because of `Redundant `self` detected.`
Add CHANGELOG entries for Sorcery#56 and Sorcery#57
Rails 5.2 appears to have deprecations that break our test suite, and solving the issue would take more time than I have available currently. Updating to 5.1 for now.
* Rails 5.2 support * Fix specs for Rails 4
This is essentially 1:1 with Rubocop's Code of Conduct, which itself uses Ruby's Code of Conduct as a base. It's minimal and easy to understand, which mirrors the ethos of the Sorcery library itself.
* Add BattleNet Provider * Add Changelog Info for BattleNet Provider * Add BattleNet Tests * Fix Errors * Fix Typo in Battlenet Provider * Add Site config to initializer * Fix Typo * Remove conditional set of code arg
* Test against ruby 3 * Switch from Travis to GH Workflows * Add metastep for simplified require GH checks * Fix typo in matrix * Remove TravisCI config * Exclude rails 5.2 from ruby 3, deprecation conflicts Co-authored-by: Josh Buker <[email protected]>
Honestly, I don't know if I want to even bother with rubocop in the legacy codebase. The styling is being closely monitored in the rework, and code style isn't really critical when it comes to security patches and bug fixes. All to say, I may just disable the rubocop job for the legacy code again at some point, if it gets annoying.
This will be implemented via Omniauth strategies in v1. |
joshbuker
added
the
to be implemented in v1
This issue or pull request will be resolved in the v1 rework, but has not yet been completed.
label
May 27, 2021
* Update mongoid adapter to use splat operator for options * Add changelog entry
# Conflicts: # lib/generators/sorcery/templates/initializer.rb # spec/controllers/controller_oauth2_spec.rb
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
to be implemented in v1
This issue or pull request will be resolved in the v1 rework, but has not yet been completed.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Add provider for QQ, which is the most used online communication tool in China.