lynndylanhurley / lynndylanhurley/devise_token_auth

Email Template Directory For devise_token_auth

Open
#1,427 6 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement
Dominant language
Ruby
Stars
3.6k
Forks
1.1k
PR merge metrics
No merged PRs in 30d

Description

Version: devise_token_auth (1.1.3)

I want to use `app/views/devise_token_auth/*.html.erb` files as email templates if there are any files in the directory.

Because when I want to use both devise and devise_token_auth, this gem use `app/views/devise/mailer/*.html.erb` files as email templates. It causes a problem that confirmation link in confirmation email is always `confirmation_url` even if developers want to another controller like Api::V1::ConfirmationsController.

For example,
devise: Registrations → `app/views/devise/mailer/*.html.erb` → `confirmation_url` in email
DTA: Api::V1::Registrations → `app/views/devise_token_auth/*.html.erb` → `api_v1_confirmation_url` in email

If you have any ideas about this issue, please let me know. Thanks!

### ADDITIONAL

I know that DeviseTokenAuth has config option `DeviseTokenAuth.default_confirm_success_url`, But I was confused when I overwritten email template in `app/views/devise/mailer/*.html.erb`.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by tracing how devise_token_auth selects email templates and generates confirmation links, focusing on app/views/devise/mailer/*.html.erb and the proposed app/views/devise_token_auth/*.html.erb path. Confirm how the two mailer flows interact with custom controllers; done means templates in the devise_token_auth directory are used when present without changing the existing Devise flow.

Written by the indexing model from the issue text.

Assessment

Tech stack
rails, ruby
Domain
api, authentication
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.