devise_token_auth 1.1.2 → 1.2.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (87) hide show
  1. checksums.yaml +4 -4
  2. data/app/controllers/devise_token_auth/application_controller.rb +10 -2
  3. data/app/controllers/devise_token_auth/concerns/resource_finder.rb +14 -1
  4. data/app/controllers/devise_token_auth/concerns/set_user_by_token.rb +31 -7
  5. data/app/controllers/devise_token_auth/confirmations_controller.rb +9 -4
  6. data/app/controllers/devise_token_auth/omniauth_callbacks_controller.rb +27 -4
  7. data/app/controllers/devise_token_auth/passwords_controller.rb +37 -15
  8. data/app/controllers/devise_token_auth/registrations_controller.rb +1 -1
  9. data/app/controllers/devise_token_auth/sessions_controller.rb +7 -1
  10. data/app/controllers/devise_token_auth/unlocks_controller.rb +6 -2
  11. data/app/models/devise_token_auth/concerns/active_record_support.rb +0 -2
  12. data/app/models/devise_token_auth/concerns/confirmable_support.rb +28 -0
  13. data/app/models/devise_token_auth/concerns/tokens_serialization.rb +16 -4
  14. data/app/models/devise_token_auth/concerns/user.rb +9 -10
  15. data/app/models/devise_token_auth/concerns/user_omniauth_callbacks.rb +4 -1
  16. data/app/validators/devise_token_auth_email_validator.rb +1 -1
  17. data/app/views/devise_token_auth/omniauth_external_window.html.erb +1 -1
  18. data/config/locales/da-DK.yml +2 -0
  19. data/config/locales/de.yml +2 -0
  20. data/config/locales/en.yml +5 -0
  21. data/config/locales/es.yml +2 -0
  22. data/config/locales/fr.yml +2 -0
  23. data/config/locales/he.yml +2 -0
  24. data/config/locales/it.yml +2 -0
  25. data/config/locales/ja.yml +3 -1
  26. data/config/locales/ko.yml +51 -0
  27. data/config/locales/nl.yml +2 -0
  28. data/config/locales/pl.yml +6 -3
  29. data/config/locales/pt-BR.yml +2 -0
  30. data/config/locales/pt.yml +6 -3
  31. data/config/locales/ro.yml +2 -0
  32. data/config/locales/ru.yml +2 -0
  33. data/config/locales/sq.yml +2 -0
  34. data/config/locales/sv.yml +2 -0
  35. data/config/locales/uk.yml +2 -0
  36. data/config/locales/vi.yml +2 -0
  37. data/config/locales/zh-CN.yml +2 -0
  38. data/config/locales/zh-HK.yml +2 -0
  39. data/config/locales/zh-TW.yml +2 -0
  40. data/lib/devise_token_auth/blacklist.rb +5 -1
  41. data/lib/devise_token_auth/controllers/helpers.rb +5 -9
  42. data/lib/devise_token_auth/engine.rb +11 -1
  43. data/lib/devise_token_auth/rails/routes.rb +15 -10
  44. data/lib/devise_token_auth/url.rb +3 -0
  45. data/lib/devise_token_auth/version.rb +1 -1
  46. data/lib/generators/devise_token_auth/USAGE +1 -1
  47. data/lib/generators/devise_token_auth/install_generator.rb +4 -4
  48. data/lib/generators/devise_token_auth/install_mongoid_generator.rb +2 -2
  49. data/lib/generators/devise_token_auth/templates/devise_token_auth.rb +5 -0
  50. data/lib/generators/devise_token_auth/templates/devise_token_auth_create_users.rb.erb +1 -1
  51. data/lib/generators/devise_token_auth/templates/user.rb.erb +2 -2
  52. data/lib/generators/devise_token_auth/templates/user_mongoid.rb.erb +2 -2
  53. data/test/controllers/devise_token_auth/confirmations_controller_test.rb +95 -19
  54. data/test/controllers/devise_token_auth/omniauth_callbacks_controller_test.rb +108 -43
  55. data/test/controllers/devise_token_auth/passwords_controller_test.rb +185 -29
  56. data/test/controllers/devise_token_auth/registrations_controller_test.rb +31 -18
  57. data/test/controllers/devise_token_auth/sessions_controller_test.rb +39 -10
  58. data/test/controllers/devise_token_auth/unlocks_controller_test.rb +21 -4
  59. data/test/controllers/overrides/confirmations_controller_test.rb +1 -1
  60. data/test/dummy/app/active_record/confirmable_user.rb +11 -0
  61. data/test/dummy/app/mongoid/confirmable_user.rb +52 -0
  62. data/test/dummy/app/views/layouts/application.html.erb +0 -2
  63. data/test/dummy/config/application.rb +0 -1
  64. data/test/dummy/config/environments/development.rb +0 -10
  65. data/test/dummy/config/environments/production.rb +0 -16
  66. data/test/dummy/config/initializers/figaro.rb +1 -1
  67. data/test/dummy/config/initializers/omniauth.rb +1 -0
  68. data/test/dummy/config/routes.rb +2 -0
  69. data/test/dummy/db/migrate/20190924101113_devise_token_auth_create_confirmable_users.rb +49 -0
  70. data/test/dummy/db/schema.rb +26 -1
  71. data/test/dummy/tmp/generators/app/controllers/application_controller.rb +6 -0
  72. data/test/dummy/tmp/generators/app/models/azpire/v1/human_resource/user.rb +56 -0
  73. data/test/dummy/tmp/generators/config/initializers/devise_token_auth.rb +60 -0
  74. data/test/factories/users.rb +2 -1
  75. data/test/lib/devise_token_auth/blacklist_test.rb +11 -3
  76. data/test/lib/devise_token_auth/rails/custom_routes_test.rb +29 -0
  77. data/test/lib/devise_token_auth/rails/routes_test.rb +87 -0
  78. data/test/lib/devise_token_auth/url_test.rb +2 -2
  79. data/test/lib/generators/devise_token_auth/install_generator_test.rb +1 -1
  80. data/test/lib/generators/devise_token_auth/install_generator_with_namespace_test.rb +1 -1
  81. data/test/models/concerns/tokens_serialization_test.rb +39 -5
  82. data/test/models/confirmable_user_test.rb +35 -0
  83. data/test/test_helper.rb +35 -4
  84. metadata +27 -14
  85. data/test/dummy/config/initializers/assets.rb +0 -10
  86. data/test/dummy/tmp/generators/app/views/devise/mailer/confirmation_instructions.html.erb +0 -5
  87. data/test/dummy/tmp/generators/app/views/devise/mailer/reset_password_instructions.html.erb +0 -8
@@ -1,12 +1,14 @@
1
1
  module DeviseTokenAuth::Concerns::TokensSerialization
2
+ extend self
2
3
  # Serialization hash to json
3
- def self.dump(object)
4
- object.each_value(&:compact!) unless object.nil?
5
- JSON.generate(object)
4
+ def dump(object)
5
+ JSON.generate(object && object.transform_values do |token|
6
+ serialize_updated_at(token).compact
7
+ end.compact)
6
8
  end
7
9
 
8
10
  # Deserialization json to hash
9
- def self.load(json)
11
+ def load(json)
10
12
  case json
11
13
  when String
12
14
  JSON.parse(json)
@@ -16,4 +18,14 @@ module DeviseTokenAuth::Concerns::TokensSerialization
16
18
  json
17
19
  end
18
20
  end
21
+
22
+ private
23
+
24
+ def serialize_updated_at(token)
25
+ updated_at_key = ['updated_at', :updated_at].find(&token.method(:[]))
26
+
27
+ return token unless token[updated_at_key].respond_to?(:iso8601)
28
+
29
+ token.merge updated_at_key => token[updated_at_key].iso8601
30
+ end
19
31
  end
@@ -44,6 +44,10 @@ module DeviseTokenAuth::Concerns::User
44
44
  def email_changed?; false; end
45
45
  def will_save_change_to_email?; false; end
46
46
 
47
+ if DeviseTokenAuth.send_confirmation_email && devise_modules.include?(:confirmable)
48
+ include DeviseTokenAuth::Concerns::ConfirmableSupport
49
+ end
50
+
47
51
  def password_required?
48
52
  return false unless provider == 'email'
49
53
  super
@@ -133,17 +137,17 @@ module DeviseTokenAuth::Concerns::User
133
137
  def token_can_be_reused?(token, client)
134
138
  # ghetto HashWithIndifferentAccess
135
139
  updated_at = tokens[client]['updated_at'] || tokens[client][:updated_at]
136
- last_token = tokens[client]['last_token'] || tokens[client][:last_token]
140
+ last_token_hash = tokens[client]['last_token'] || tokens[client][:last_token]
137
141
 
138
142
  return true if (
139
143
  # ensure that the last token and its creation time exist
140
- updated_at && last_token &&
144
+ updated_at && last_token_hash &&
141
145
 
142
146
  # ensure that previous token falls within the batch buffer throttle time of the last request
143
147
  updated_at.to_time > Time.zone.now - DeviseTokenAuth.batch_request_buffer_throttle &&
144
148
 
145
149
  # ensure that the token is valid
146
- DeviseTokenAuth::TokenFactory.valid_token_hash?(last_token)
150
+ DeviseTokenAuth::TokenFactory.token_hash_is_token?(last_token_hash, token)
147
151
  )
148
152
  end
149
153
 
@@ -214,13 +218,8 @@ module DeviseTokenAuth::Concerns::User
214
218
  end
215
219
 
216
220
  def should_remove_tokens_after_password_reset?
217
- if Rails::VERSION::MAJOR <= 5
218
- encrypted_password_changed? &&
219
- DeviseTokenAuth.remove_tokens_after_password_reset
220
- else
221
- saved_change_to_attribute?(:encrypted_password) &&
222
- DeviseTokenAuth.remove_tokens_after_password_reset
223
- end
221
+ DeviseTokenAuth.remove_tokens_after_password_reset &&
222
+ (respond_to?(:encrypted_password_changed?) && encrypted_password_changed?)
224
223
  end
225
224
 
226
225
  def remove_tokens_after_password_reset
@@ -9,7 +9,7 @@ module DeviseTokenAuth::Concerns::UserOmniauthCallbacks
9
9
  validates_presence_of :uid, unless: :email_provider?
10
10
 
11
11
  # only validate unique emails among email registration users
12
- validates :email, uniqueness: { scope: :provider }, on: :create, if: :email_provider?
12
+ validates :email, uniqueness: { case_sensitive: false, scope: :provider }, on: :create, if: :email_provider?
13
13
 
14
14
  # keep uid in sync with email
15
15
  before_save :sync_uid
@@ -23,6 +23,9 @@ module DeviseTokenAuth::Concerns::UserOmniauthCallbacks
23
23
  end
24
24
 
25
25
  def sync_uid
26
+ unless self.new_record?
27
+ return if devise_modules.include?(:confirmable) && !@bypass_confirmation_postpone && postpone_email_change?
28
+ end
26
29
  self.uid = email if email_provider?
27
30
  end
28
31
  end
@@ -3,7 +3,7 @@
3
3
  class DeviseTokenAuthEmailValidator < ActiveModel::EachValidator
4
4
  def validate_each(record, attribute, value)
5
5
  unless value =~ /\A([^@\s]+)@((?:[-a-z0-9]+\.)+[a-z]{2,})\z/i
6
- record.errors[attribute] << email_invalid_message
6
+ record.errors.add(attribute, email_invalid_message)
7
7
  end
8
8
  end
9
9
 
@@ -15,7 +15,7 @@
15
15
  Cordova / PhoneGap)
16
16
  */
17
17
 
18
- var data = JSON.parse(decodeURIComponent('<%= URI::escape( @data.to_json ) %>'));
18
+ var data = JSON.parse(decodeURIComponent('<%= ERB::Util.url_encode( @data.to_json ) %>'));
19
19
 
20
20
  window.addEventListener("message", function(ev) {
21
21
  if (ev.data === "requestCredentials") {
@@ -14,6 +14,8 @@ da-DK:
14
14
  account_with_uid_destroyed: "Kontoen med UID '%{uid}' er slettet."
15
15
  account_to_destroy_not_found: "Kan ikke finde kontoen som skal slettes."
16
16
  user_not_found: "Brugeren ikke fundet."
17
+ omniauth:
18
+ not_allowed_redirect_url: "Omdirigering til '%{redirect_url}' er ikke tilladt."
17
19
  passwords:
18
20
  missing_email: "Du skal udfylde email feltet."
19
21
  missing_redirect_url: "Der er ingen omdirigeringsadresse."
@@ -14,6 +14,8 @@ de:
14
14
  account_with_uid_destroyed: "Account mit der uid '%{uid}' wurde gelöscht."
15
15
  account_to_destroy_not_found: "Der zu löschende Account kann nicht gefunden werden."
16
16
  user_not_found: "Benutzer kann nicht gefunden werden."
17
+ omniauth:
18
+ not_allowed_redirect_url: "Weiterleitung zu '%{redirect_url}' ist nicht gestattet."
17
19
  passwords:
18
20
  missing_email: "Sie müssen eine E-Mail-Adresse angeben."
19
21
  missing_redirect_url: "Es fehlt die URL zu Weiterleitung."
@@ -14,11 +14,14 @@ en:
14
14
  account_with_uid_destroyed: "Account with UID '%{uid}' has been destroyed."
15
15
  account_to_destroy_not_found: "Unable to locate account for destruction."
16
16
  user_not_found: "User not found."
17
+ omniauth:
18
+ not_allowed_redirect_url: "Redirect to '%{redirect_url}' not allowed."
17
19
  passwords:
18
20
  missing_email: "You must provide an email address."
19
21
  missing_redirect_url: "Missing redirect URL."
20
22
  not_allowed_redirect_url: "Redirect to '%{redirect_url}' not allowed."
21
23
  sended: "An email has been sent to '%{email}' containing instructions for resetting your password."
24
+ sended_paranoid: "If your email address exists in our database, you will receive a password recovery link at your email address in a few minutes."
22
25
  user_not_found: "Unable to find user with email '%{email}'."
23
26
  password_not_required: "This account does not require a password. Sign in using your '%{provider}' account instead."
24
27
  missing_passwords: "You must fill out the fields labeled 'Password' and 'Password confirmation'."
@@ -26,9 +29,11 @@ en:
26
29
  unlocks:
27
30
  missing_email: "You must provide an email address."
28
31
  sended: "An email has been sent to '%{email}' containing instructions for unlocking your account."
32
+ sended_paranoid: "If your account exists, you will receive an email with instructions for how to unlock it in a few minutes."
29
33
  user_not_found: "Unable to find user with email '%{email}'."
30
34
  confirmations:
31
35
  sended: "An email has been sent to '%{email}' containing instructions for confirming your account."
36
+ sended_paranoid: "If your email address exists in our database, you will receive an email with instructions for how to confirm your email address in a few minutes."
32
37
  user_not_found: "Unable to find user with email '%{email}'."
33
38
  missing_email: "You must provide an email address."
34
39
 
@@ -14,6 +14,8 @@ es:
14
14
  account_with_uid_destroyed: "La cuenta con el identificador '%{uid}' se ha eliminado."
15
15
  account_to_destroy_not_found: "No se puede encontrar la cuenta a borrar."
16
16
  user_not_found: "Usuario no encontrado."
17
+ omniauth:
18
+ not_allowed_redirect_url: "Redirección hacia '%{redirect_url}' no esta permitida."
17
19
  passwords:
18
20
  missing_email: "Debe incluir un correo electrónico."
19
21
  missing_redirect_url: "Falta el Url de redirección."
@@ -14,6 +14,8 @@ fr:
14
14
  account_with_uid_destroyed: "Le compte avec l'identifiant '%{uid}' a été supprimé."
15
15
  account_to_destroy_not_found: "Le compte à supprimer est introuvable."
16
16
  user_not_found: "Utilisateur introuvable."
17
+ omniauth:
18
+ not_allowed_redirect_url: "Redirection vers '%{redirect_url}' n'est pas autorisée."
17
19
  passwords:
18
20
  missing_email: "Vous devez soumettre un e-mail."
19
21
  missing_redirect_url: "URL de redirection manquante."
@@ -14,6 +14,8 @@ he:
14
14
  account_with_uid_destroyed: "חשבון עם UID '%{uid}' הושמד."
15
15
  account_to_destroy_not_found: "לא ניתן לאתר חשבון להשמדה."
16
16
  user_not_found: "המשתמש לא נמצא."
17
+ omniauth:
18
+ not_allowed_redirect_url: "הפניה אל '%{redirect_url}' אינה מותרת."
17
19
  passwords:
18
20
  missing_email: "עליך לספק כתובת דוא\"ל."
19
21
  missing_redirect_url: "כתובת אתר להפניה מחדש חסרה."
@@ -14,6 +14,8 @@ it:
14
14
  account_with_uid_destroyed: "L'account con UID '%{uid}' è stato eliminato."
15
15
  account_to_destroy_not_found: "Impossibile trovare l'account da eliminare."
16
16
  user_not_found: "Utente non trovato."
17
+ omniauth:
18
+ not_allowed_redirect_url: "Redirezione a '%{redirect_url}' non consentita."
17
19
  passwords:
18
20
  missing_email: "Devi fornire un indirizzo email."
19
21
  missing_redirect_url: "Redirect URL mancante."
@@ -14,6 +14,8 @@ ja:
14
14
  account_with_uid_destroyed: "'%{uid}' のアカウントは削除されました。"
15
15
  account_to_destroy_not_found: "削除するアカウントが見つかりません。"
16
16
  user_not_found: "ユーザーが見つかりません。"
17
+ omniauth:
18
+ not_allowed_redirect_url: "'%{redirect_url}' へのリダイレクトは許可されていません。"
17
19
  passwords:
18
20
  missing_email: "メールアドレスが与えられていません。"
19
21
  missing_redirect_url: "リダイレクト URL が与えられていません。"
@@ -27,7 +29,7 @@ ja:
27
29
  messages:
28
30
  validate_sign_up_params: "リクエストボディに適切なアカウント新規登録データを送信してください。"
29
31
  validate_account_update_params: "リクエストボディに適切なアカウント更新のデータを送信してください。"
30
- not_email: "はメールアドレスではありません"
32
+ not_email: "は有効ではありません"
31
33
  devise:
32
34
  mailer:
33
35
  confirmation_instructions:
@@ -0,0 +1,51 @@
1
+ ko:
2
+ devise_token_auth:
3
+ sessions:
4
+ not_confirmed: "'%{email}'로 주소 인증 메일을 발송했습니다. 계정을 활성화하기 위해서는 반드시 메일의 안내를 따라야 합니다."
5
+ bad_credentials: "계정 정보가 맞지 않습니다. 다시 시도해 주세요."
6
+ not_supported: "POST /sign_in to sign in을 사용해주세요. GET은 지원하지 않습니다."
7
+ user_not_found: "유저를 찾을 수 없습니다."
8
+ invalid: "계정 정보가 맞지 않습니다."
9
+ registrations:
10
+ missing_confirm_success_url: "'confirm_success_url' 파라미터가 없습니다."
11
+ redirect_url_not_allowed: "'%{redirect_url}' 주소로 리다이렉트는 허용하지 않습니다."
12
+ email_already_exists: "'%{email}'을 사용하는 계정이 이미 있습니다."
13
+ account_with_uid_destroyed: " UID가 '%{uid}'인 계정을 삭제했습니다."
14
+ account_to_destroy_not_found: "삭제할 계정을 찾을 수 없습니다."
15
+ user_not_found: "유저를 찾을 수 없습니다."
16
+ omniauth:
17
+ not_allowed_redirect_url: "'%{redirect_url}' 주소로 리다이렉트는 허용하지 않습니다."
18
+ passwords:
19
+ missing_email: "이메일 주소를 입력해야 합니다."
20
+ missing_redirect_url: "redirect URL이 없습니다."
21
+ not_allowed_redirect_url: "'%{redirect_url}' 주소로 리다이렉트는 허용하지 않습니다."
22
+ sended: "'%{email}'로 비밀번호를 재설정하기 위한 안내 메일을 발송했습니다."
23
+ user_not_found: "'%{email}'을 사용하는 유저를 찾을 수 없습니다."
24
+ password_not_required: "이 계정은 비밀번호가 필요하지 않습니다. '%{provider}'으로 로그인을 진행해 주세요."
25
+ missing_passwords: "비밀번호와 비밀번호 확인 필드를 반드시 입력해야 합니다."
26
+ successfully_updated: "비밀번호를 성공적으로 업데이트 했습니다."
27
+ unlocks:
28
+ missing_email: "이메일 주소를 반드시 입력해야 합니다."
29
+ sended: "'%{email}'로 계정 잠금 해제를 위한 안내 메일을 발송했습니다."
30
+ user_not_found: "'%{email}'을 사용하는 유저를 찾을 수 없습니다."
31
+ errors:
32
+ messages:
33
+ validate_sign_up_params: "요청 값에 알맞은 로그인 데이터를 입력하세요."
34
+ validate_account_update_params: "요청 값에 알맞은 업데이트 데이터를 입력하세요."
35
+ not_email: "이메일이 아닙니다."
36
+ devise:
37
+ mailer:
38
+ confirmation_instructions:
39
+ confirm_link_msg: "아래의 링크를 이용해 계정 인증을 할 수 있습니다."
40
+ confirm_account_link: "본인 계정 인증"
41
+ reset_password_instructions:
42
+ request_reset_link_msg: "누군가 당신의 비밀번호를 변경하는 링크를 요청했으며, 다음의 링크에서 비밀번호 변경이 가능합니다."
43
+ password_change_link: "비밀번호 변경"
44
+ ignore_mail_msg: "비밀번호 변경을 요청하지 않으셨다면 이 메일을 무시하십시오."
45
+ no_changes_msg: "위 링크에 접속하여 새로운 비밀번호를 생성하기 전까지 귀하의 비밀번호는 변경되지 않습니다."
46
+ unlock_instructions:
47
+ account_lock_msg: "로그인 실패 횟수 초과로 귀하의 계정이 잠금 처리되었습니다."
48
+ unlock_link_msg: "계정 잠금을 해제하려면 아래 링크를 클릭하세요."
49
+ unlock_link: "계정 잠금 해제"
50
+ hello: "안녕하세요"
51
+ welcome: "환영합니다"
@@ -14,6 +14,8 @@ nl:
14
14
  account_with_uid_destroyed: "Account met id '%{uid}' is verwijderd."
15
15
  account_to_destroy_not_found: "Te verwijderen account niet gevonden."
16
16
  user_not_found: "Gebruiker niet gevonden."
17
+ omniauth:
18
+ not_allowed_redirect_url: "Redirect naar '%{redirect_url}' niet toegestaan."
17
19
  passwords:
18
20
  missing_email: "Je moet een e-mailadres opgeven."
19
21
  missing_redirect_url: "Redirect URL ontbreekt."
@@ -14,6 +14,8 @@ pl:
14
14
  account_with_uid_destroyed: "Konto z uid '%{uid}' zostało usunięte."
15
15
  account_to_destroy_not_found: "Nie odnaleziono konta do usunięcia."
16
16
  user_not_found: "Użytkownik nie został odnaleziony."
17
+ omniauth:
18
+ not_allowed_redirect_url: "Przekierowanie na adres '%{redirect_url}' nie jest dozwolone."
17
19
  passwords:
18
20
  missing_email: "Musisz wprowadzić adres e-mail."
19
21
  missing_redirect_url: "Brak adresu zwrotnego."
@@ -24,9 +26,10 @@ pl:
24
26
  missing_passwords: "Musisz wypełnić wszystkie pola z etykietą 'Hasło' oraz 'Potwierdzenie hasła'."
25
27
  successfully_updated: "Twoje hasło zostało zaktualizowane."
26
28
  errors:
27
- validate_sign_up_params: "Proszę dostarczyć odpowiednie dane logowania w ciele zapytania."
28
- validate_account_update_params: "Proszę dostarczyć odpowiednie dane aktualizacji konta w ciele zapytania."
29
- not_email: "nie jest prawidłowym adresem e-mail"
29
+ messages:
30
+ validate_sign_up_params: "Proszę dostarczyć odpowiednie dane logowania w ciele zapytania."
31
+ validate_account_update_params: "Proszę dostarczyć odpowiednie dane aktualizacji konta w ciele zapytania."
32
+ not_email: "nie jest prawidłowym adresem e-mail"
30
33
  devise:
31
34
  mailer:
32
35
  confirmation_instructions:
@@ -14,6 +14,8 @@ pt-BR:
14
14
  account_with_uid_destroyed: "A conta com uid '%{uid}' foi excluída."
15
15
  account_to_destroy_not_found: "Não foi possível encontrar a conta para exclusão."
16
16
  user_not_found: "Usuário não encontrado."
17
+ omniauth:
18
+ not_allowed_redirect_url: "Redirecionamento para '%{redirect_url}' não permitido."
17
19
  passwords:
18
20
  missing_email: "Informe o endereço de e-mail."
19
21
  missing_redirect_url: "URL para redirecionamento não informada."
@@ -14,6 +14,8 @@ pt:
14
14
  account_with_uid_destroyed: "A conta com uid '%{uid}' foi excluída."
15
15
  account_to_destroy_not_found: "Não foi possível encontrar a conta para exclusão."
16
16
  user_not_found: "Utilizador não encontrado."
17
+ omniauth:
18
+ not_allowed_redirect_url: "Redirecionamento para '%{redirect_url}' não permitido."
17
19
  passwords:
18
20
  missing_email: "Informe o endereço de e-mail."
19
21
  missing_redirect_url: "URL para redirecionamento não informada."
@@ -24,9 +26,10 @@ pt:
24
26
  missing_passwords: "Preencha a senha e a confirmação de senha."
25
27
  successfully_updated: "Senha atualizada com sucesso."
26
28
  errors:
27
- validate_sign_up_params: "Os dados submetidos na requisição de registo são inválidos."
28
- validate_account_update_params: "Os dados submetidos para atualização de conta são inválidos."
29
- not_email: "não é um e-mail"
29
+ messages:
30
+ validate_sign_up_params: "Os dados submetidos na requisição de registo são inválidos."
31
+ validate_account_update_params: "Os dados submetidos para atualização de conta são inválidos."
32
+ not_email: "não é um e-mail"
30
33
  devise:
31
34
  mailer:
32
35
  confirmation_instructions:
@@ -14,6 +14,8 @@ ro:
14
14
  account_with_uid_destroyed: "Contul cu UID '%{uid}' a fost șters."
15
15
  account_to_destroy_not_found: "Nu se poate localiza contul pentru ștergere."
16
16
  user_not_found: "Utilizatorul nu a fost găsit."
17
+ omniauth:
18
+ not_allowed_redirect_url: "Redirecționarea către '%{redirect_url}' nu este permisă."
17
19
  passwords:
18
20
  missing_email: "Trebuie să introduci o adresă de e-mail."
19
21
  missing_redirect_url: "URL-ul pentru redirecționare lipsește."
@@ -14,6 +14,8 @@ ru:
14
14
  account_with_uid_destroyed: "Учетная запись с uid '%{uid}' удалена."
15
15
  account_to_destroy_not_found: "Не удается найти учетную запись для удаления."
16
16
  user_not_found: "Пользователь не найден."
17
+ omniauth:
18
+ not_allowed_redirect_url: "Переадресация на '%{redirect_url}' не разрешена."
17
19
  passwords:
18
20
  missing_email: "Вы должны указать адрес электронной почты."
19
21
  missing_redirect_url: "Отсутствует адрес переадресации."
@@ -14,6 +14,8 @@ sq:
14
14
  account_with_uid_destroyed: "Llogaria me UID-në '%{uid}' është fshirë."
15
15
  account_to_destroy_not_found: "Nuk u gjet llogaria për fshirje."
16
16
  user_not_found: "Përdoruesi nuk u gjet."
17
+ omniauth:
18
+ not_allowed_redirect_url: "Nuk lejohet shkuarja tek URL-ja '%{redirect_url}'."
17
19
  passwords:
18
20
  missing_email: "Ju duhet të jepni një email adresë."
19
21
  missing_redirect_url: "Mungon URL-ja për ridërgim."
@@ -14,6 +14,8 @@ sv:
14
14
  account_with_uid_destroyed: "Kontot med UID '%{uid}' har tagits bort."
15
15
  account_to_destroy_not_found: "Kunde inte hitta kontot för borttagning."
16
16
  user_not_found: "Användaren hittades ej."
17
+ omniauth:
18
+ not_allowed_redirect_url: "Omdirigering till '%{redirect_url}' ej tillåten."
17
19
  passwords:
18
20
  missing_email: "Du måste ange en emailadress."
19
21
  missing_redirect_url: "Saknar en omdirigerings-URL."
@@ -14,6 +14,8 @@ uk:
14
14
  account_with_uid_destroyed: "Акаунт з UID '%{uid}' було видалено."
15
15
  account_to_destroy_not_found: "Неможливо знайти акаунт для видалення."
16
16
  user_not_found: "Користувача не знайдено"
17
+ omniauth:
18
+ not_allowed_redirect_url: "Перенаправлення до '%{redirect_url}' не дозволено."
17
19
  passwords:
18
20
  missing_email: "Ви маєте ввести email адресу."
19
21
  missing_redirect_url: "Немає URL для перенаправлення."
@@ -14,6 +14,8 @@ vi:
14
14
  account_with_uid_destroyed: "Tài khoản với UID '%{uid}' vừa bị phá hủy."
15
15
  account_to_destroy_not_found: "Không thể xác định tài khoản cho việc phá hủy."
16
16
  user_not_found: "Người dùng không tìm thấy."
17
+ omniauth:
18
+ not_allowed_redirect_url: "Chuyển hướng tới '%{redirect_url}' không được phép."
17
19
  passwords:
18
20
  missing_email: "Bạn cần cung cấp địa chỉ email."
19
21
  missing_redirect_url: "Thiếu đường đẫn URL."
@@ -14,6 +14,8 @@ zh-CN:
14
14
  account_with_uid_destroyed: "账号 '%{uid}' 已被移除。"
15
15
  account_to_destroy_not_found: "无法找到目标帐号。"
16
16
  user_not_found: "找不到帐号。"
17
+ omniauth:
18
+ not_allowed_redirect_url: "不支持转向到 '%{redirect_url}'"
17
19
  passwords:
18
20
  missing_email: "必需提供邮箱。"
19
21
  missing_redirect_url: "欠缺 redirect URL."
@@ -16,6 +16,8 @@ zh-TW:
16
16
  account_with_uid_destroyed: "帳號 '%{uid}' 已被移除。"
17
17
  account_to_destroy_not_found: "無法找到目標帳號。"
18
18
  user_not_found: "找不到帳號。"
19
+ omniauth:
20
+ not_allowed_redirect_url: "不支援轉向到 '%{redirect_url}'"
19
21
  passwords:
20
22
  missing_email: "必需提供電郵。"
21
23
  missing_redirect_url: "欠缺 redirect URL."
@@ -16,6 +16,8 @@ zh-TW:
16
16
  account_with_uid_destroyed: "帳號 '%{uid}' 已被移除。"
17
17
  account_to_destroy_not_found: "無法找到目標帳號。"
18
18
  user_not_found: "找不到帳號。"
19
+ omniauth:
20
+ not_allowed_redirect_url: "不支援轉向到 '%{redirect_url}'"
19
21
  passwords:
20
22
  missing_email: "必需提供電郵。"
21
23
  missing_redirect_url: "欠缺 redirect URL."
@@ -1,2 +1,6 @@
1
1
  # don't serialize tokens
2
- Devise::Models::Authenticatable::BLACKLIST_FOR_SERIALIZATION << :tokens
2
+ if defined? Devise::Models::Authenticatable::UNSAFE_ATTRIBUTES_FOR_SERIALIZATION
3
+ Devise::Models::Authenticatable::UNSAFE_ATTRIBUTES_FOR_SERIALIZATION << :tokens
4
+ else
5
+ Devise::Models::Authenticatable::BLACKLIST_FOR_SERIALIZATION << :tokens
6
+ end