14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
|
# File 'app/controllers/devise/checkga_controller.rb', line 14
def update
resource = resource_class.find_by_gauth_tmp(params[resource_name]['tmpid'])
if not resource.nil?
if resource.validate_token(params[resource_name]['token'].to_i)
set_flash_message(:notice, :signed_in) if is_navigational_format?
sign_in(resource_name,resource)
respond_with resource, :location => after_sign_in_path_for(resource)
else
redirect_to :root
end
else
redirect_to :root
end
end
|