-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Allow encrypted_password to be nil (#38)
Related to #27 The problem with enforcing encrypted_password was that if you wanted to have email/password sign in *and/or* some other social sign in then it would not work. You'd have to set "encrypted_password" to "fake" or some other hack. This update makes it so you can make encrypted_password nil if you want.
- Loading branch information
1 parent
52f341b
commit 61a63a9
Showing
5 changed files
with
15 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,9 @@ | ||
class FakeAuthenticatable | ||
include Authentic::PasswordAuthenticatable | ||
|
||
getter id, encrypted_password | ||
getter id : Int32 | ||
getter encrypted_password : String? | ||
|
||
def initialize(@id : Int32 = 1, @encrypted_password : String = "abc123") | ||
def initialize(@id = 1, @encrypted_password = "abc123") | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
module Authentic::PasswordAuthenticatable | ||
abstract def id | ||
abstract def encrypted_password : String | ||
abstract def encrypted_password : String? | ||
end |