lynndylanhurley / lynndylanhurley/devise_token_auth
Devise token auth tries to send confirmation email even though it is disabled
- Dominant language
- Ruby
- Stars
- 3.6k
- Forks
- 1.1k
- PR merge metrics
- No merged PRs in 30d
Description
Hi,
I followed the instructions on disabling the :confirmable option. This is my user.rb file:
```
class User < ActiveRecord::Base
devise :database_authenticatable, :recoverable,
:trackable, :validatable, :registerable,
:omniauthable
include DeviseTokenAuth::Concerns::User
end
```
And when registering a user I get the error:
```
ActionView::Template::Error (Missing host to link to! Please provide the :host parameter, set default_url_options[:host], or set :only_path to true):
You can confirm your account email through the link below:
<%= link_to 'Confirm my account', confirmation_url(@resource, confirmation_token: @token, config: message['client-config'].to_s, redirect_url: message['redirect-url']) %>
```
Any idea why?
Thanks,
Uri
Contributor guide
Research direction
Start with the User model configuration shown in user.rb and trace registration into the confirmation email template included in the error. Check why the disabled :confirmable configuration still reaches confirmation_url, then reproduce registration to verify it no longer attempts confirmation delivery or raises the missing-host error.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rails, ruby
- Domain
- api, authentication
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100