rails+devise+devise_token_auth

3892 단어 Railsdevise
model/cuustomer.rb
  devise :database_authenticatable, :registerable,
         :recoverable, :rememberable, :validatable, :confirmable,
         :omniauthable
  include DeviseTokenAuth::Concerns::User

  serialize :tokens

  after_create :send_confirmation_email, if: -> { !Rails.env.test? && Customer.devise_modules.include?(:confirmable) }
  private
    def send_confirmation_email
      self.send_confirmation_instructions
    end

end

이 serialize :tokens 덕분에 Postman으로 로그인하려고 할 수 없습니다. 감사합니다.



model/cuustomer.rb
  devise :database_authenticatable, :registerable,
         :recoverable, :rememberable, :validatable, :confirmable,
         :omniauthable
  include DeviseTokenAuth::Concerns::User

  # serialize :tokens

  after_create :send_confirmation_email, if: -> { !Rails.env.test? && Customer.devise_modules.include?(:confirmable) }
  private
    def send_confirmation_email
      self.send_confirmation_instructions
    end

end

devise_token_auth# 비밀번호를 잊었을 때





devise_token_auth# 로그인



좋은 웹페이지 즐겨찾기