lynndylanhurley / lynndylanhurley/devise_token_auth
Email Template Directory For devise_token_auth
Nobody has claimed this yet.
- 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
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- 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