-
Notifications
You must be signed in to change notification settings - Fork 371
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Omniauth 2 requires post. heartcombo/devise#5236 ``` Install the gem OmniAuth - Rails CSRF Protection Add the link user_facebook_omniauth_authorize_path method: :post ``` TODO: Convert the rest of the links to `user_github_omniauth_authorize_path` to be post
- Loading branch information
Showing
5 changed files
with
29 additions
and
19 deletions.
There are no files selected for viewing
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
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
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -30,22 +30,24 @@ class ActionDispatch::IntegrationTest | |
end | ||
|
||
OmniAuth.config.test_mode = true | ||
OmniAuth.config.add_mock(:github, { | ||
uid: 'mockstar', | ||
credentials: { | ||
token: ENV['GITHUB_API_KEY'] || "d401116495671f0a0ceca9276e677eff" | ||
}, | ||
email: "[email protected]", | ||
info: { | ||
nickname: 'mockstar' | ||
}, | ||
extra: { | ||
raw_info: { | ||
name: "Mock Star", | ||
avatar_url: "http://gravatar.com/avatar/default" | ||
} | ||
} | ||
}) | ||
OmniAuth.config.add_mock( | ||
:github, { | ||
uid: 'mockstar', | ||
credentials: { | ||
token: ENV['GITHUB_API_KEY'] || "d401116495671f0a0ceca9276e677eff" | ||
}, | ||
email: "[email protected]", | ||
info: { | ||
nickname: 'mockstar' | ||
}, | ||
extra: { | ||
raw_info: { | ||
name: "Mock Star", | ||
avatar_url: "http://gravatar.com/avatar/default" | ||
} | ||
} | ||
} | ||
) | ||
|
||
VCR.configure do |c| | ||
# This 'allow' should be temporary, work towards covering | ||
|
@@ -68,7 +70,8 @@ def login_via_github | |
# Works based off of omniauth's mock | ||
# The user will be looked up from the database and updated | ||
# based off of the info in the mock. | ||
visit "/users/auth/github" | ||
visit "/" | ||
click_on "Log in" | ||
end | ||
end | ||
end | ||
|