fbdoorman 0.9.1 → 0.9.2
Sign up to get free protection for your applications and to get access to all the features.
data/Rakefile
CHANGED
@@ -18,7 +18,7 @@ Jeweler::Tasks.new do |gem|
|
|
18
18
|
gem.summary = "Rails authentication with facebook single sign-on OR email & password."
|
19
19
|
gem.description = "Painless user registration and sign-in using Facebook single sign-on with JS. Typical email login still works too."
|
20
20
|
gem.email = "pelaez89@gmail.com"
|
21
|
-
gem.version = "0.9.
|
21
|
+
gem.version = "0.9.2"
|
22
22
|
gem.homepage = "http://github.com/davidpelaez/minifb-clearance"
|
23
23
|
gem.authors = ["Fbdoorman: David Pelaez","MiniFB: Appoxy","Clearance: Thoughtbot"]
|
24
24
|
gem.files = FileList["[A-Z]*", "{app,config,generators,lib,shoulda_macros,rails}/**/*"]
|
@@ -18,6 +18,7 @@ class Clearance::UsersController < ApplicationController
|
|
18
18
|
sign_in(@user) #Login recently created user
|
19
19
|
redirect_to(url_after_create)
|
20
20
|
else
|
21
|
+
flash_failure_after_create
|
21
22
|
render :template => 'users/new'
|
22
23
|
end
|
23
24
|
end
|
@@ -30,6 +31,12 @@ class Clearance::UsersController < ApplicationController
|
|
30
31
|
:default => "You will receive an email within the next few minutes. " <<
|
31
32
|
"It contains instructions for confirming your account.")
|
32
33
|
end
|
34
|
+
|
35
|
+
def flash_failure_after_create
|
36
|
+
flash.now[:failure] = translate(:used_email_or_unmatching_passwords,
|
37
|
+
:scope => [:clearance, :controllers, :users],
|
38
|
+
:default => "Email is already being used or the passwords didn't match.")
|
39
|
+
end
|
33
40
|
|
34
41
|
def url_after_create
|
35
42
|
sign_in_url
|
@@ -50,7 +50,6 @@ window.fbAsyncInit = function() {
|
|
50
50
|
<%= if !signed_in? then
|
51
51
|
"var accessToken = response.authResponse.accessToken;
|
52
52
|
var expiration = response.authResponse.expiresIn;
|
53
|
-
//window.location='/facebook' + '?token=' + accessToken + '&expiration=' + expiration;
|
54
53
|
post_to_url('/facebook', {'token':accessToken, 'expiration': expiration});"
|
55
54
|
end %>
|
56
55
|
}
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: fbdoorman
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.9.
|
4
|
+
version: 0.9.2
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -11,7 +11,7 @@ authors:
|
|
11
11
|
autorequire:
|
12
12
|
bindir: bin
|
13
13
|
cert_chain: []
|
14
|
-
date:
|
14
|
+
date: 2012-01-10 00:00:00.000000000Z
|
15
15
|
dependencies: []
|
16
16
|
description: Painless user registration and sign-in using Facebook single sign-on
|
17
17
|
with JS. Typical email login still works too.
|