authentication-zero 2.16.12 → 2.16.13

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 4cba615fcc2174e4662ce5f805c6b2499638058c9dbcef5bfe520789290c1db2
4
- data.tar.gz: 4f73d414bdbaad60361f592f739214d4b97711d7df08f1dc29522f8b03ed942e
3
+ metadata.gz: fd4aba188e6a8763ada4f0cc90f370e8980afd0903e3e5f17a5f4bcc5db7c8d6
4
+ data.tar.gz: 8e16e20f5ed9d2cf1aadd469bdeffae20e1c51ab030bb5731697ae37dd749079
5
5
  SHA512:
6
- metadata.gz: 930bd997605a77a12d755b59469365124832403a6dddac106350a78c9893329c6f47bf9650e9e9c8ade54a8a648af265dd894cf1818934147fb23ea7ffa7f647
7
- data.tar.gz: 4161d49cdecf59dd3d5b412281394373010a4ac08fcb2f07a20fb64b56788c17e40d1445270072efa2e48780dc7659f66091f1a2074786679cd09bcd6350e2e1
6
+ metadata.gz: dc0688a6b1fae46b456d7c7ce473f1a4414f13bf9bc29439c6d687a67e9122d58eb76e592ef2796c79f1b0e19816e66e6a92f7278dc9df31c9595382108016ce
7
+ data.tar.gz: 06d51e04679f0821a4cb296f2e06f588c0614b75ae1f8ca6ce370cbca494d950280b617e8f6346539ddbe8d412838c9fdb9fceb4b6315d47b3471e30b9b7cd19
data/CHANGELOG.md CHANGED
@@ -1,3 +1,8 @@
1
+ ## Authentication Zero 2.16.13 ##
2
+
3
+ * Enable resend invitation
4
+ * Refactor first_or_initialize -> find_or_initialize_by
5
+
1
6
  ## Authentication Zero 2.16.12 ##
2
7
 
3
8
  * Bring back --sudoable, just for html and you should set before_action yourself
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- authentication-zero (2.16.12)
4
+ authentication-zero (2.16.13)
5
5
 
6
6
  GEM
7
7
  remote: https://rubygems.org/
@@ -1,3 +1,3 @@
1
1
  module AuthenticationZero
2
- VERSION = "2.16.12"
2
+ VERSION = "2.16.13"
3
3
  end
@@ -4,7 +4,7 @@ class InvitationsController < ApplicationController
4
4
  end
5
5
 
6
6
  def create
7
- @user = User.new(user_params)
7
+ @user = User.create_with(user_params).find_or_initialize_by(email: params[:email])
8
8
 
9
9
  if @user.save
10
10
  send_invitation_instructions
@@ -3,7 +3,7 @@ class Sessions::OmniauthController < ApplicationController
3
3
  skip_before_action :authenticate
4
4
 
5
5
  def create
6
- @user = User.where(omniauth_params).first_or_initialize(user_params)
6
+ @user = User.create_with(user_params).find_or_initialize_by(omniauth_params)
7
7
 
8
8
  if @user.save
9
9
  session = @user.sessions.create!
@@ -20,14 +20,14 @@ class Sessions::OmniauthController < ApplicationController
20
20
  end
21
21
 
22
22
  private
23
- def omniauth_params
24
- { provider: omniauth.provider, uid: omniauth.uid }
25
- end
26
-
27
23
  def user_params
28
24
  { email: omniauth.info.email, password: SecureRandom::base58, verified: true }
29
25
  end
30
26
 
27
+ def omniauth_params
28
+ { provider: omniauth.provider, uid: omniauth.uid }
29
+ end
30
+
31
31
  def omniauth
32
32
  request.env["omniauth.auth"]
33
33
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: authentication-zero
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.16.12
4
+ version: 2.16.13
5
5
  platform: ruby
6
6
  authors:
7
7
  - Nixon
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2023-04-03 00:00:00.000000000 Z
11
+ date: 2023-04-06 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description:
14
14
  email: