entrance 0.5.0 → 0.5.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 1f93f2931fee64ff4cf3798c2773ded125d84494
4
- data.tar.gz: 7fd53107e51f3c895724aa8534713747a49f90b7
3
+ metadata.gz: 7231c38750f07b6ea663c1e4e446ba86b79cce06
4
+ data.tar.gz: d0aaa20d179f3011d4585a55c2f092aa990a2bd7
5
5
  SHA512:
6
- metadata.gz: 5c201e15df23bbbbc24a089a5db10421cab3800846f48e7d12f6b6bf045e90979fa5084e627cb30d5c02066014a300ba97da90203f61136b12fb379420e63d41
7
- data.tar.gz: cb5ee5269797176bc0b1ac999be9a84e747eb9674aea1377671ce95673140cbd27638d64f2429d0c8e36e4c46342ca5206f2b24707ca3e9ba9980f766c7d11d6
6
+ metadata.gz: e59bd11b3743ee3f7393af21a7755d7a9084f61df32c4b704dd17e575d80fa943d90d0228c0d1714069442343e50f5ce68cbe0b75147c58e220fc8b17afa537c
7
+ data.tar.gz: 037b6abc80fbf601ccf925f3f5828817ea200df06a9b061ee86353b469a727350af87dd263faefe5a1121c4cb3ff1062df56c4ae8ba7b37521ea1197a7ade3bb
@@ -1,7 +1,7 @@
1
1
  class WelcomeController < ApplicationController
2
2
 
3
3
  def index
4
- # renders 'welcome/index'
4
+ # renders 'welcome/index' if used is logged in
5
5
  end
6
6
 
7
- end
7
+ end
@@ -58,7 +58,10 @@ module Entrance
58
58
 
59
59
  app.send(action, '/auth/:provider/callback') do
60
60
  auth = request.env['omniauth.auth']
61
- user = ::Entrance::OmniAuth.auth_or_create(auth) or return return_401
61
+ unless user = ::Entrance::OmniAuth.auth_or_create(auth)
62
+ # return return_401
63
+ redirect_with(Entrance.config.access_denied_redirect_to, :error, 'Unable to create record for new user. Check the log file.')
64
+ end
62
65
 
63
66
  if ::Entrance::OmniAuth.valid_user?(user)
64
67
  login!(user, app.settings.auth_remember)
@@ -133,6 +136,7 @@ module Entrance
133
136
  return user.save && user
134
137
  else
135
138
  log "Invalid user: #{user.errors.to_a.join(', ')}"
139
+ false
136
140
  end
137
141
  end
138
142
 
@@ -1,7 +1,7 @@
1
1
  module Entrance
2
2
  MAJOR = 0
3
3
  MINOR = 5
4
- PATCH = 0
4
+ PATCH = 1
5
5
 
6
6
  VERSION = [MAJOR, MINOR, PATCH].join('.')
7
7
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: entrance
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.0
4
+ version: 0.5.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Tomás Pollak
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-06-01 00:00:00.000000000 Z
11
+ date: 2016-07-01 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bcrypt