0

Using the devise_token_auth gem, I am making a rails-based API in which I am trying to reset my password using email.

On opening the email with reset link, I get this Error:

uninitialized constant DeviseTokenAuth::Concerns::User::BCrypt

The code points to Api::V1::Overrides::PasswordsController#edit

tokens[client_id] = {
  token: BCrypt::Password.create(token),
  expiry: expiry
}.merge!(token_extras)

What can I do to make my reset link to go onto my reset form?

I am following this for PasswordsController action Tried checking github but there no one actually has faced this sort of error and I cannot rectify it.

P.S. I am not an experienced Ruby developer.

NM Pennypacker
  • 6,704
  • 11
  • 36
  • 38
Aman Relan
  • 373
  • 1
  • 2
  • 12
  • Do you require bcrypt (`require 'bcrypt'` at the beginning of the file) in your `PasswordsController`? – MrShemek Mar 29 '19 at 13:04

1 Answers1

0

Probably just missing the bcrypt gem, e.g. add this in your Gemfile:

gem 'bcryt`
localhostdotdev
  • 1,795
  • 16
  • 21