Encrypt access_token and refresh_token

This commit is contained in:
2020-04-09 00:41:54 +02:00
parent 4b0a054596
commit 73ccddee94
6 changed files with 19 additions and 2 deletions

View File

@@ -1,6 +1,9 @@
class Authentication < ApplicationRecord
belongs_to :user
encrypts :access_token
encrypts :refresh_token
def expired?
expires_at <= Time.current
end