-
Notifications
You must be signed in to change notification settings - Fork 14
Feature/coach login with GitHub & admin login with username/password #50
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
Merged
tansaku
merged 40 commits into
AgileVentures:develop
from
junyu-w:feature/login-with-github
Oct 26, 2016
Merged
Changes from 35 commits
Commits
Show all changes
40 commits
Select commit
Hold shift + click to select a range
dbc148b
updated travis ci badges & iter0 doc
junyu-w 79445f8
updated code climate badge & iter0 doc
junyu-w 089e1eb
added pivotal tracker project url
junyu-w 703b0be
iter 1: cucumber
Shuotong cc649b2
Merge remote-tracking branch 'upstream/develop' into develop
junyu-w ac82d6f
added status of both main repo and forked repo to readme
junyu-w 982f2a3
Merge branch 'cucumber' into develop
junyu-w a3ada8b
added heroku staging url
junyu-w acad466
added github login functionality
junyu-w e594d45
removed copied sample code
junyu-w 65dee30
added bootstrap gems
junyu-w aeb22e1
added annotate gem and better error gem
junyu-w a59f53d
added role attr to users
junyu-w 210605a
added migration to create root user
junyu-w 7abeb4d
changed omniauth github path
junyu-w d78f7b1
added updated application.yml.asc file
junyu-w b94d7fd
added credential for test env
junyu-w d71c2da
added whitelist authorized user checking during login
junyu-w 5c127d4
fixed root user migration & added success msg for github signing in
junyu-w fa7c364
updated env file
junyu-w 3d0caf7
passed tests assumed no whitelist functionality
junyu-w bab3832
removed test from env file
junyu-w a70594d
fixed bug in user login feature
junyu-w 1a1b511
removed duplicated notice msg
junyu-w f99a57d
updated env file to include staging environment
junyu-w d9eba9a
removed whitelist checking
junyu-w 8e3e1bd
added user uid validation
junyu-w 327480a
removed uid validation because of conflict with admin
junyu-w f9959ab
front-end added
junyu-w 76378af
added user authentication
junyu-w c47f8dd
updated schema & staging env encryption key
junyu-w 3a2ce5e
fixed old tests except for view metric sample with secrets & removed …
junyu-w 10790f9
removed redundant user session check
junyu-w 687b040
Merge remote-tracking branch 'upstream/develop' into develop
junyu-w e720fd9
Merge branch 'develop' into feature/login-with-github
junyu-w 800848a
removed username/password related stuff
junyu-w 031c182
removed unused controller files
junyu-w edcaff0
added root user with github credentials
junyu-w 4c274c5
test passing with intermittent db locking error after adding mocked o…
junyu-w fbbe572
fixed tests
junyu-w File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 |
|---|---|---|
| @@ -0,0 +1,28 @@ | ||
| class Users::ConfirmationsController < Devise::ConfirmationsController | ||
| # GET /resource/confirmation/new | ||
| # def new | ||
| # super | ||
| # end | ||
|
|
||
| # POST /resource/confirmation | ||
| # def create | ||
| # super | ||
| # end | ||
|
|
||
| # GET /resource/confirmation?confirmation_token=abcdef | ||
| # def show | ||
| # super | ||
| # end | ||
|
|
||
| # protected | ||
|
|
||
| # The path used after resending confirmation instructions. | ||
| # def after_resending_confirmation_instructions_path_for(resource_name) | ||
| # super(resource_name) | ||
| # end | ||
|
|
||
| # The path used after confirmation. | ||
| # def after_confirmation_path_for(resource_name, resource) | ||
| # super(resource_name, resource) | ||
| # end | ||
| end |
This file contains hidden or 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 |
|---|---|---|
| @@ -0,0 +1,39 @@ | ||
| class Users::OmniauthCallbacksController < Devise::OmniauthCallbacksController | ||
| # You should configure your model like this: | ||
| # devise :omniauthable, omniauth_providers: [:twitter] | ||
|
|
||
| # You should also create an action method in this controller like this: | ||
| # def twitter | ||
| # end | ||
|
|
||
| # More info at: | ||
| # https://github.com/plataformatec/devise#omniauth | ||
|
|
||
| # GET|POST /resource/auth/twitter | ||
| # def passthru | ||
| # super | ||
| # end | ||
|
|
||
| # GET|POST /users/auth/twitter/callback | ||
| # def failure | ||
| # super | ||
| # end | ||
|
|
||
| # protected | ||
|
|
||
| # The path used when OmniAuth fails | ||
| # def after_omniauth_failure_path_for(scope) | ||
| # super(scope) | ||
| # end | ||
|
|
||
| def github | ||
| @user = User.from_omniauth(request.env["omniauth.auth"]) | ||
| if @user.nil? | ||
| flash[:alert] = "You are not authorized." | ||
| redirect_to new_user_session_path | ||
| else | ||
| flash[:notice] = "Signed in successfully." | ||
| sign_in_and_redirect @user | ||
| end | ||
| end | ||
| end |
This file contains hidden or 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 |
|---|---|---|
| @@ -0,0 +1,32 @@ | ||
| class Users::PasswordsController < Devise::PasswordsController | ||
| # GET /resource/password/new | ||
| # def new | ||
| # super | ||
| # end | ||
|
|
||
| # POST /resource/password | ||
| # def create | ||
| # super | ||
| # end | ||
|
|
||
| # GET /resource/password/edit?reset_password_token=abcdef | ||
| # def edit | ||
| # super | ||
| # end | ||
|
|
||
| # PUT /resource/password | ||
| # def update | ||
| # super | ||
| # end | ||
|
|
||
| # protected | ||
|
|
||
| # def after_resetting_password_path_for(resource) | ||
| # super(resource) | ||
| # end | ||
|
|
||
| # The path used after sending reset password instructions | ||
| # def after_sending_reset_password_instructions_path_for(resource_name) | ||
| # super(resource_name) | ||
| # end | ||
| end |
This file contains hidden or 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 |
|---|---|---|
| @@ -0,0 +1,60 @@ | ||
| class Users::RegistrationsController < Devise::RegistrationsController | ||
| # before_action :configure_sign_up_params, only: [:create] | ||
| # before_action :configure_account_update_params, only: [:update] | ||
|
|
||
| # GET /resource/sign_up | ||
| # def new | ||
| # super | ||
| # end | ||
|
|
||
| # POST /resource | ||
| # def create | ||
| # super | ||
| # end | ||
|
|
||
| # GET /resource/edit | ||
| # def edit | ||
| # super | ||
| # end | ||
|
|
||
| # PUT /resource | ||
| # def update | ||
| # super | ||
| # end | ||
|
|
||
| # DELETE /resource | ||
| # def destroy | ||
| # super | ||
| # end | ||
|
|
||
| # GET /resource/cancel | ||
| # Forces the session data which is usually expired after sign | ||
| # in to be expired now. This is useful if the user wants to | ||
| # cancel oauth signing in/up in the middle of the process, | ||
| # removing all OAuth session data. | ||
| # def cancel | ||
| # super | ||
| # end | ||
|
|
||
| # protected | ||
|
|
||
| # If you have extra params to permit, append them to the sanitizer. | ||
| # def configure_sign_up_params | ||
| # devise_parameter_sanitizer.permit(:sign_up, keys: [:attribute]) | ||
| # end | ||
|
|
||
| # If you have extra params to permit, append them to the sanitizer. | ||
| # def configure_account_update_params | ||
| # devise_parameter_sanitizer.permit(:account_update, keys: [:attribute]) | ||
| # end | ||
|
|
||
| # The path used after sign up. | ||
| # def after_sign_up_path_for(resource) | ||
| # super(resource) | ||
| # end | ||
|
|
||
| # The path used after sign up for inactive accounts. | ||
| # def after_inactive_sign_up_path_for(resource) | ||
| # super(resource) | ||
| # end | ||
| end |
This file contains hidden or 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 |
|---|---|---|
| @@ -0,0 +1,25 @@ | ||
| class Users::SessionsController < Devise::SessionsController | ||
| # before_action :configure_sign_in_params, only: [:create] | ||
|
|
||
| # GET /resource/sign_in | ||
| # def new | ||
| # super | ||
| # end | ||
|
|
||
| # POST /resource/sign_in | ||
| # def create | ||
| # super | ||
| # end | ||
|
|
||
| # DELETE /resource/sign_out | ||
| # def destroy | ||
| # super | ||
| # end | ||
|
|
||
| # protected | ||
|
|
||
| # If you have extra params to permit, append them to the sanitizer. | ||
| # def configure_sign_in_params | ||
| # devise_parameter_sanitizer.permit(:sign_in, keys: [:attribute]) | ||
| # end | ||
| end |
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
let's remove this if not being used any more - we should avoid commenting old code - old code is kept in git history