This repository has been archived by the owner on Oct 1, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Adds Facebook sign-in / registration
Fixes #222 (as far as Facebook at least) This was fairly straightforward with a few hiccups. I implemented Facebook because that is the one in the tutorial. I attempted to move some other stuff around (`RegistrationsController`) to match the submodule approach. Things it does not support - [ ] Newsletter preference (isn't passed through) - [ ] Group invitation code (personalized group code) - [ ] Group signup code (the group "public" signup code) - [ ] Entity registration (skip search for team in group creation)
- Loading branch information
1 parent
5ceae86
commit 99f4d9f
Showing
18 changed files
with
369 additions
and
235 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 |
---|---|---|
@@ -0,0 +1,9 @@ | ||
.facebook_register { | ||
text-align:center; | ||
margin: 3em 0; | ||
a { | ||
i { | ||
margin-right: 2em; | ||
} | ||
} | ||
} |
This file was deleted.
Oops, something went wrong.
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 |
---|---|---|
@@ -0,0 +1,20 @@ | ||
## | ||
# Users :: OminiAuth Callbacks Controller | ||
module Users | ||
## | ||
# Users :: OminiAuth Callbacks Controller | ||
class OmniauthCallbacksController < Devise::OmniauthCallbacksController | ||
def facebook | ||
@user = User.from_omniauth(request.env['omniauth.auth']) | ||
if @user.persisted? | ||
sign_in_and_redirect @user | ||
set_flash_message( | ||
:notice, :success, kind: 'Facebook' | ||
) if is_navigational_format? | ||
else | ||
session['devise.facebook_data'] = request.env['omniauth.auth'] | ||
redirect_to new_user_registration_url | ||
end | ||
end | ||
end | ||
end |
Oops, something went wrong.