From acfa6bb07174e62548c4722f40ac560e2b247eac Mon Sep 17 00:00:00 2001
From: hikahana <22.h.hanada.nutfes@gmail.com>
Date: Tue, 25 Nov 2025 14:36:13 +0900
Subject: [PATCH 1/7] =?UTF-8?q?feat:=20gemfile=E3=81=AE=E4=BD=9C=E6=88=90?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
api/Gemfile | 2 ++
api/Gemfile.lock | 18 ++++++++++++++++++
2 files changed, 20 insertions(+)
diff --git a/api/Gemfile b/api/Gemfile
index bd9ba7e67..034236fb0 100644
--- a/api/Gemfile
+++ b/api/Gemfile
@@ -53,6 +53,8 @@ group :development do
gem 'r2-oas'
gem 'spring'
gem 'spring-watcher-listen', '~> 2.0.0'
+ gem 'letter_opener'
+ gem 'letter_opener_web'
end
# Windows does not include zoneinfo files, so bundle the tzinfo-data gem
diff --git a/api/Gemfile.lock b/api/Gemfile.lock
index 4a3255d16..4b5f98c8a 100644
--- a/api/Gemfile.lock
+++ b/api/Gemfile.lock
@@ -60,6 +60,8 @@ GEM
minitest (>= 5.1)
tzinfo (~> 2.0)
zeitwerk (~> 2.3)
+ addressable (2.8.7)
+ public_suffix (>= 2.0.2, < 7.0)
ast (2.4.3)
base64 (0.2.0)
bcrypt (3.1.16)
@@ -67,6 +69,8 @@ GEM
msgpack (~> 1.2)
builder (3.2.4)
byebug (11.1.3)
+ childprocess (5.1.0)
+ logger (~> 1.5)
concurrent-ruby (1.1.8)
crass (1.0.6)
devise (4.7.3)
@@ -128,6 +132,17 @@ GEM
json (2.13.2)
key_flatten (1.0.0)
language_server-protocol (3.17.0.5)
+ launchy (3.1.1)
+ addressable (~> 2.8)
+ childprocess (~> 5.0)
+ logger (~> 1.6)
+ letter_opener (1.10.0)
+ launchy (>= 2.2, < 4)
+ letter_opener_web (2.0.0)
+ actionmailer (>= 5.2)
+ letter_opener (~> 1.7)
+ railties (>= 5.2)
+ rexml
lint_roller (1.1.0)
listen (3.5.1)
rb-fsevent (~> 0.10, >= 0.10.3)
@@ -158,6 +173,7 @@ GEM
racc
pdfkit (0.8.5)
prism (1.4.0)
+ public_suffix (6.0.2)
puma (4.3.7)
nio4r (~> 2.0)
r2-oas (0.5.0)
@@ -298,6 +314,8 @@ DEPENDENCIES
devise_token_auth
dotenv-rails
jbuilder (~> 2.7)
+ letter_opener
+ letter_opener_web
listen (~> 3.2)
mysql2 (>= 0.4.4)
pdfkit
From 9f6045d764f52505cd44cd831d3c31938d5d812e Mon Sep 17 00:00:00 2001
From: hikahana <22.h.hanada.nutfes@gmail.com>
Date: Tue, 25 Nov 2025 14:39:06 +0900
Subject: [PATCH 2/7] =?UTF-8?q?feat:=20=E3=83=91=E3=82=B9=E3=83=AF?=
=?UTF-8?q?=E3=83=BC=E3=83=89=E3=83=AA=E3=82=BB=E3=83=83=E3=83=88API?=
=?UTF-8?q?=E9=83=A8=E5=88=86=E3=81=AE=E4=BD=9C=E6=88=90?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../api/auth/passwords_controller.rb | 10 ++
api/app/mailers/application_mailer.rb | 2 +-
.../reset_password_instructions.html.erb | 95 +++++++++++++++++++
.../reset_password_instructions.text.erb | 58 +++++++++++
api/config/environments/development.rb | 7 ++
api/config/environments/production.rb | 17 ++++
api/config/initializers/devise.rb | 2 +-
api/config/routes.rb | 7 +-
8 files changed, 195 insertions(+), 3 deletions(-)
create mode 100644 api/app/controllers/api/auth/passwords_controller.rb
create mode 100644 api/app/mailers/reset_password_instructions.html.erb
create mode 100644 api/app/mailers/reset_password_instructions.text.erb
diff --git a/api/app/controllers/api/auth/passwords_controller.rb b/api/app/controllers/api/auth/passwords_controller.rb
new file mode 100644
index 000000000..f01027277
--- /dev/null
+++ b/api/app/controllers/api/auth/passwords_controller.rb
@@ -0,0 +1,10 @@
+# frozen_string_literal: true
+
+module Api
+ module Auth
+ class PasswordsController < DeviseTokenAuth::PasswordsController
+ # Devise Token Auth 標準のパスワードリセットフローを利用します。
+ # 基本的な挙動は親クラスに委譲し、必要があればここでカスタマイズします。
+ end
+ end
+end
diff --git a/api/app/mailers/application_mailer.rb b/api/app/mailers/application_mailer.rb
index d84cb6e71..ad8a92a73 100644
--- a/api/app/mailers/application_mailer.rb
+++ b/api/app/mailers/application_mailer.rb
@@ -1,6 +1,6 @@
# frozen_string_literal: true
class ApplicationMailer < ActionMailer::Base
- default from: 'from@example.com'
+ default from: ENV.fetch('MAILER_SENDER', 'no-reply@group-manager.nutfes.net')
layout 'mailer'
end
diff --git a/api/app/mailers/reset_password_instructions.html.erb b/api/app/mailers/reset_password_instructions.html.erb
new file mode 100644
index 000000000..f08f31095
--- /dev/null
+++ b/api/app/mailers/reset_password_instructions.html.erb
@@ -0,0 +1,95 @@
+<% email_label =
+ if @resource.respond_to?(:name) && @resource.name.present?
+ "#{@resource.name} 様"
+ elsif @resource.respond_to?(:email) && @resource.email.present?
+ "#{@resource.email} 様"
+ else
+ "ご利用者様"
+ end %>
+<% uid =
+ if @resource.respond_to?(:uid) && @resource.uid.present?
+ @resource.uid
+ elsif @resource.respond_to?(:email) && @resource.email.present?
+ @resource.email
+ end %>
+<% client_id =
+ if defined?(@client_id) && @client_id.present?
+ @client_id
+ elsif defined?(@client_config) && @client_config.present?
+ @client_config
+ end %>
+<% redirect_base = defined?(@redirect_url) ? @redirect_url : nil %>
+<% tokenised_link =
+ if redirect_base.present? && client_id.present? && uid.present?
+ query = { client_id: client_id, token: @token, uid: uid }.to_query
+ separator = redirect_base.include?('?') ? '&' : '?'
+ "#{redirect_base}#{separator}#{query}"
+ end %>
+<% reset_link =
+ if tokenised_link.present?
+ tokenised_link
+ elsif respond_to?(:edit_password_url)
+ edit_password_url(@resource, reset_password_token: @token)
+ end %>
+<% reset_link ||= '#' %>
+
+
+
+
+
+ パスワード再設定のご案内
+
+
+
+
+
パスワード再設定のご案内
+
+ <%= email_label %>、こんにちは。
+ パスワード再設定のお申し込みを受け付けました。以下のボタンをクリックし、パスワード再設定ページへ進んでください。
+
+
+
+
+
+ ボタンが正しく動作しない場合は、以下のURLをコピーしてブラウザに貼り付けてください。
+
+
+ <%= reset_link %>
+
+
+ <% if tokenised_link.present? && client_id.present? && uid.present? %>
+
+
トークン情報について
+
+ 上記のリンクは password_reset.html にアクセスし、必要なトークン情報を自動的に付与します。ブラウザの拡張機能などでリンクが正しく開けない場合は、以下のトークン情報を手動で入力してください。
+
+
+ - client_id:
<%= client_id %>
+ - token:
<%= @token %>
+ - uid:
<%= uid %>
+
+
+ APIを直接呼び出す場合は、リクエストヘッダーの access-token / client / uid に同じ値を設定してください。
+
+
+ <% end %>
+
+
+ このリンクの有効期限は一度のみです。お心当たりのない操作の場合は、このメールを破棄してください。
+
+
+ 本メールは送信専用です。ご返信いただいても対応いたしかねますのでご了承ください。
+
+
+
+
+
diff --git a/api/app/mailers/reset_password_instructions.text.erb b/api/app/mailers/reset_password_instructions.text.erb
new file mode 100644
index 000000000..f4f75e759
--- /dev/null
+++ b/api/app/mailers/reset_password_instructions.text.erb
@@ -0,0 +1,58 @@
+<% email_label =
+ if @resource.respond_to?(:name) && @resource.name.present?
+ "#{@resource.name} 様"
+ elsif @resource.respond_to?(:email) && @resource.email.present?
+ "#{@resource.email} 様"
+ else
+ "ご利用者様"
+ end %>
+<% uid =
+ if @resource.respond_to?(:uid) && @resource.uid.present?
+ @resource.uid
+ elsif @resource.respond_to?(:email) && @resource.email.present?
+ @resource.email
+ end %>
+<% client_id =
+ if defined?(@client_id) && @client_id.present?
+ @client_id
+ elsif defined?(@client_config) && @client_config.present?
+ @client_config
+ end %>
+<% redirect_base = defined?(@redirect_url) ? @redirect_url : nil %>
+<% tokenised_link =
+ if redirect_base.present? && client_id.present? && uid.present?
+ query = { client_id: client_id, token: @token, uid: uid }.to_query
+ separator = redirect_base.include?('?') ? '&' : '?'
+ "#{redirect_base}#{separator}#{query}"
+ end %>
+<% reset_link =
+ if tokenised_link.present?
+ tokenised_link
+ elsif respond_to?(:edit_password_url)
+ edit_password_url(@resource, reset_password_token: @token)
+ end %>
+<% reset_link ||= '#' %>
+
+パスワード再設定のご案内
+
+<%= email_label %>
+
+パスワード再設定のお申し込みを受け付けました。以下のURLへアクセスし、案内に従って新しいパスワードを設定してください。
+
+<%= reset_link %>
+
+上記のリンクが開けない場合は、ブラウザのアドレスバーにコピー&ペーストしてご利用ください。
+
+<% if tokenised_link.present? && client_id.present? && uid.present? %>
+なお、手動でトークン情報を入力する場合や API 経由で再設定する場合には、以下の情報を使用します。
+
+client_id: <%= client_id %>
+token: <%= @token %>
+uid: <%= uid %>
+
+リクエストヘッダーには access-token / client / uid に同じ値を設定してください。
+<% end %>
+
+このリンクは一度きり有効です。お心当たりのない場合は本メールを破棄してください。
+
+本メールは送信専用です。ご返信いただいても対応いたしかねますのでご了承ください。
diff --git a/api/config/environments/development.rb b/api/config/environments/development.rb
index 0e7fad6b6..08c50e3ca 100644
--- a/api/config/environments/development.rb
+++ b/api/config/environments/development.rb
@@ -54,4 +54,11 @@
localhost
api
]
+ # パスワードメール送信用の開発環境設定(letter_opener)
+ config.action_mailer.default_url_options = { host: 'localhost', port: 3000 }
+ config.action_mailer.asset_host = 'http://localhost:3000'
+ config.action_mailer.delivery_method = :letter_opener
+ config.action_mailer.perform_deliveries = true
+ config.action_mailer.raise_delivery_errors = true
+
end
diff --git a/api/config/environments/production.rb b/api/config/environments/production.rb
index 12e0aa85b..7648a0ecf 100644
--- a/api/config/environments/production.rb
+++ b/api/config/environments/production.rb
@@ -56,6 +56,23 @@
# config.active_job.queue_name_prefix = "myapp_production"
config.action_mailer.perform_caching = false
+ config.action_mailer.default_url_options = {
+ host: ENV.fetch('MAILER_HOST', 'group-manager.nutfes.net'),
+ protocol: ENV.fetch('MAILER_PROTOCOL', 'https')
+ }
+ config.action_mailer.asset_host = ENV.fetch('MAILER_ASSET_HOST', 'https://group-manager.nutfes.net')
+ config.action_mailer.raise_delivery_errors = true
+ config.action_mailer.perform_deliveries = true
+ config.action_mailer.delivery_method = :smtp
+ config.action_mailer.smtp_settings = {
+ address: ENV.fetch('SMTP_ADDRESS', 'smtp.office365.com'),
+ port: ENV.fetch('SMTP_PORT', 587).to_i,
+ domain: ENV.fetch('SMTP_DOMAIN', 'group-manager.nutfes.net'),
+ user_name: ENV.fetch('SMTP_USERNAME'),
+ password: ENV.fetch('SMTP_PASSWORD'),
+ authentication: :login,
+ enable_starttls_auto: true
+ }
# Ignore bad email addresses and do not raise email delivery errors.
# Set this to true and configure the email server for immediate delivery to raise delivery errors.
diff --git a/api/config/initializers/devise.rb b/api/config/initializers/devise.rb
index 35311c03f..55acd7341 100644
--- a/api/config/initializers/devise.rb
+++ b/api/config/initializers/devise.rb
@@ -24,7 +24,7 @@
# Configure the e-mail address which will be shown in Devise::Mailer,
# note that it will be overwritten if you use your own mailer class
# with default "from" parameter.
- config.mailer_sender = 'please-change-me-at-config-initializers-devise@example.com'
+ config.mailer_sender = ENV.fetch('MAILER_SENDER', 'no-reply@example.com')
# Configure the class responsible to send e-mails.
# config.mailer = 'Devise::Mailer'
diff --git a/api/config/routes.rb b/api/config/routes.rb
index 0f3c60d26..f2c48e24e 100644
--- a/api/config/routes.rb
+++ b/api/config/routes.rb
@@ -1,6 +1,10 @@
# frozen_string_literal: true
Rails.application.routes.draw do
+ if Rails.env.development?
+ mount LetterOpenerWeb::Engine, at: '/letter_opener'
+ end
+
# 識別番号割り当て
get 'group_identification' => 'group_identification#index'
post 'group_identification' => 'group_identification#create'
@@ -336,7 +340,8 @@
namespace :api do
mount_devise_token_auth_for 'User', at: 'auth', controllers: {
- registrations: 'api/auth/registrations'
+ registrations: 'api/auth/registrations',
+ passwords: 'api/auth/passwords'
}
namespace :auth do
resources :sessions
From 488d3fca25cf89059270b9d49b5914acaca271ef Mon Sep 17 00:00:00 2001
From: hikahana <22.h.hanada.nutfes@gmail.com>
Date: Tue, 25 Nov 2025 14:39:23 +0900
Subject: [PATCH 3/7] =?UTF-8?q?feat:=20=E3=83=95=E3=83=AD=E3=83=B3?=
=?UTF-8?q?=E3=83=88=E9=83=A8=E5=88=86=E3=81=AE=E4=BB=AE=E4=BD=9C=E6=88=90?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../PasswordResetCard/PasswordResetCard.tsx | 114 ++++++++++++++++++
.../src/components/PasswordResetCard/index.ts | 1 +
user/src/pages/index.tsx | 20 +--
3 files changed, 127 insertions(+), 8 deletions(-)
create mode 100644 user/src/components/PasswordResetCard/PasswordResetCard.tsx
create mode 100644 user/src/components/PasswordResetCard/index.ts
diff --git a/user/src/components/PasswordResetCard/PasswordResetCard.tsx b/user/src/components/PasswordResetCard/PasswordResetCard.tsx
new file mode 100644
index 000000000..256c3d6cc
--- /dev/null
+++ b/user/src/components/PasswordResetCard/PasswordResetCard.tsx
@@ -0,0 +1,114 @@
+import { FormEvent, useMemo, useState } from 'react';
+import { toast } from 'react-toastify';
+import Button from '@/components/Button';
+import TextBox from '@/components/Form/TextBox';
+
+const DEFAULT_REDIRECT_PATH = '/password_reset.html';
+
+const buildRedirectUrl = () => {
+ const apiUrl = process.env.NEXT_PUBLIC_API_URL;
+ if (!apiUrl) return '';
+ try {
+ const url = new URL(apiUrl);
+ url.pathname = DEFAULT_REDIRECT_PATH;
+ url.search = '';
+ url.hash = '';
+ return url.toString();
+ } catch (error) {
+ console.error('Invalid NEXT_PUBLIC_API_URL:', apiUrl, error);
+ return '';
+ }
+};
+
+const ERROR_MESSAGE =
+ 'パスワード再設定メールの送信に失敗しました。メールアドレスが間違っているか、登録されていない可能性があります。';
+
+const PasswordResetCard = () => {
+ const [email, setEmail] = useState('');
+ const [isSubmitting, setIsSubmitting] = useState(false);
+
+ const redirectUrl = useMemo(() => buildRedirectUrl(), []);
+ const apiUrl = process.env.NEXT_PUBLIC_API_URL;
+
+ const handleSubmit = async (event: FormEvent) => {
+ event.preventDefault();
+ if (!email) {
+ toast.error('メールアドレスを入力してください。');
+ return;
+ }
+ if (!apiUrl) {
+ console.error(
+ 'NEXT_PUBLIC_API_URL is not defined.',
+ 'Password reset cannot proceed.'
+ );
+ toast.error(ERROR_MESSAGE);
+ return;
+ }
+ if (!redirectUrl) {
+ console.error('Redirect URL for password reset is invalid.');
+ toast.error(ERROR_MESSAGE);
+ return;
+ }
+
+ setIsSubmitting(true);
+ try {
+ const response = await fetch(`${apiUrl}/api/auth/password`, {
+ method: 'POST',
+ headers: {
+ 'Content-Type': 'application/json',
+ },
+ body: JSON.stringify({
+ email,
+ redirect_url: redirectUrl,
+ }),
+ });
+
+ const body = await response.json().catch(() => null);
+
+ if (!response.ok) {
+ if (body) {
+ console.error('Password reset error body:', body);
+ }
+ toast.error(ERROR_MESSAGE);
+ return;
+ }
+
+ toast.success('パスワード再設定メールを送信しました。');
+ setEmail('');
+ } catch (error) {
+ console.error('Failed to request password reset:', error);
+ toast.error(ERROR_MESSAGE);
+ } finally {
+ setIsSubmitting(false);
+ }
+ };
+
+ return (
+
+
+
パスワードをお忘れの方
+
+ 登録済みのメールアドレスを入力すると、パスワード再設定用のリンクをお送りします。
+
+
+
+
+ );
+};
+
+export default PasswordResetCard;
diff --git a/user/src/components/PasswordResetCard/index.ts b/user/src/components/PasswordResetCard/index.ts
new file mode 100644
index 000000000..418c8e3ce
--- /dev/null
+++ b/user/src/components/PasswordResetCard/index.ts
@@ -0,0 +1 @@
+export { default } from './PasswordResetCard';
diff --git a/user/src/pages/index.tsx b/user/src/pages/index.tsx
index 5e9fc55a5..fa3dfe7dc 100644
--- a/user/src/pages/index.tsx
+++ b/user/src/pages/index.tsx
@@ -1,6 +1,7 @@
import { useState } from 'react';
import LoginModal from '@/components/LoginModal';
import NewsList from '@/components/NewsList';
+import PasswordResetCard from '@/components/PasswordResetCard';
import RegisterCarousel from '@/components/RegisterCarousel';
import WelcomeBox from '@/components/WelcomeBox';
@@ -30,14 +31,17 @@ export default function Home() {
-
{
- handleLoginClick();
- }}
- handleRegisterClick={() => {
- handleRegisterClick();
- }}
- />
+
+
{
+ handleLoginClick();
+ }}
+ handleRegisterClick={() => {
+ handleRegisterClick();
+ }}
+ />
+
+
>
);
From ecc867422aa8925f04122a195fefaf1c0de073e9 Mon Sep 17 00:00:00 2001
From: hikahana <22.h.hanada.nutfes@gmail.com>
Date: Tue, 25 Nov 2025 14:39:32 +0900
Subject: [PATCH 4/7] =?UTF-8?q?=E3=81=AA=E3=81=9E=E3=81=AEreadme?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
README.md | 15 ++++++++++++++-
1 file changed, 14 insertions(+), 1 deletion(-)
diff --git a/README.md b/README.md
index fe28370f4..e6ae88aeb 100644
--- a/README.md
+++ b/README.md
@@ -16,7 +16,7 @@

### api
-ruby 2.7.1
+ruby 2.7.1
rails 6.1.3.1
### view(ユーザー画面)
@@ -31,3 +31,16 @@ nuxt.js
## セットアップ
[git cloneをしたら](https://github.com/NUTFes/group-manager-2/wiki/git-clone-%E3%82%92%E3%81%97%E3%81%9F%E3%82%89)
+
+## メール送信設定(Outlook SMTP)
+本番環境でOutlook(Office365)のSMTPを利用する場合、以下の環境変数を設定してください。値は `.env` やインフラ側のシークレットマネージャ等で安全に管理します。
+
+- MAILER_SENDER: 送信元メールアドレス(例: no-reply@group-manager.nutfes.net)
+- MAILER_HOST: メール内のURLで利用するホスト名(例: group-manager.nutfes.net)
+- MAILER_PROTOCOL: URLに使用するプロトコル。既定値は `https`
+- MAILER_ASSET_HOST: メール内の静的アセットURLに使用するホスト。既定値は `https://group-manager.nutfes.net`
+- SMTP_ADDRESS: SMTPサーバーのアドレス。既定値は `smtp.office365.com`
+- SMTP_PORT: SMTPサーバーのポート番号。既定値は `587`
+- SMTP_DOMAIN: SMTP認証で利用するドメイン(HELO/EHLO)。既定値は `group-manager.nutfes.net`
+- SMTP_USERNAME: Outlookアカウントのユーザー名(メールアドレス)
+- SMTP_PASSWORD: Outlookアカウントのパスワード
From fb99ecd47036feb06c03a57de32886e2ae80ca28 Mon Sep 17 00:00:00 2001
From: "github-actions[bot]"
<41898282+github-actions[bot]@users.noreply.github.com>
Date: Tue, 25 Nov 2025 05:43:09 +0000
Subject: [PATCH 5/7] chore(rubocop): auto fix (-A) [skip ci]
---
api/Gemfile | 4 ++--
api/config/environments/development.rb | 1 -
api/config/routes.rb | 4 +---
3 files changed, 3 insertions(+), 6 deletions(-)
diff --git a/api/Gemfile b/api/Gemfile
index 034236fb0..189105d9c 100644
--- a/api/Gemfile
+++ b/api/Gemfile
@@ -50,11 +50,11 @@ end
group :development do
gem 'listen', '~> 3.2'
# Spring speeds up development by keeping your application running in the background. Read more: https://github.com/rails/spring
+ gem 'letter_opener'
+ gem 'letter_opener_web'
gem 'r2-oas'
gem 'spring'
gem 'spring-watcher-listen', '~> 2.0.0'
- gem 'letter_opener'
- gem 'letter_opener_web'
end
# Windows does not include zoneinfo files, so bundle the tzinfo-data gem
diff --git a/api/config/environments/development.rb b/api/config/environments/development.rb
index 08c50e3ca..4535fb5f4 100644
--- a/api/config/environments/development.rb
+++ b/api/config/environments/development.rb
@@ -60,5 +60,4 @@
config.action_mailer.delivery_method = :letter_opener
config.action_mailer.perform_deliveries = true
config.action_mailer.raise_delivery_errors = true
-
end
diff --git a/api/config/routes.rb b/api/config/routes.rb
index f2c48e24e..f03f69e22 100644
--- a/api/config/routes.rb
+++ b/api/config/routes.rb
@@ -1,9 +1,7 @@
# frozen_string_literal: true
Rails.application.routes.draw do
- if Rails.env.development?
- mount LetterOpenerWeb::Engine, at: '/letter_opener'
- end
+ mount LetterOpenerWeb::Engine, at: '/letter_opener' if Rails.env.development?
# 識別番号割り当て
get 'group_identification' => 'group_identification#index'
From b3255d1e3985a61159902aff33590472e861be05 Mon Sep 17 00:00:00 2001
From: hikahana <22.h.hanada.nutfes@gmail.com>
Date: Tue, 25 Nov 2025 20:53:14 +0900
Subject: [PATCH 6/7] =?UTF-8?q?refactor:=20=E3=83=95=E3=82=A1=E3=82=A4?=
=?UTF-8?q?=E3=83=AB=E7=A7=BB=E5=8B=95?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../reset_password_instructions.html.erb | 17 -----------------
.../reset_password_instructions.text.erb | 0
2 files changed, 17 deletions(-)
rename api/app/{mailers => views/devise/mailer}/reset_password_instructions.html.erb (66%)
rename api/app/{mailers => views/devise/mailer}/reset_password_instructions.text.erb (100%)
diff --git a/api/app/mailers/reset_password_instructions.html.erb b/api/app/views/devise/mailer/reset_password_instructions.html.erb
similarity index 66%
rename from api/app/mailers/reset_password_instructions.html.erb
rename to api/app/views/devise/mailer/reset_password_instructions.html.erb
index f08f31095..02c4c1673 100644
--- a/api/app/mailers/reset_password_instructions.html.erb
+++ b/api/app/views/devise/mailer/reset_password_instructions.html.erb
@@ -66,23 +66,6 @@
<%= reset_link %>
- <% if tokenised_link.present? && client_id.present? && uid.present? %>
-
-
トークン情報について
-
- 上記のリンクは password_reset.html にアクセスし、必要なトークン情報を自動的に付与します。ブラウザの拡張機能などでリンクが正しく開けない場合は、以下のトークン情報を手動で入力してください。
-
-
- - client_id:
<%= client_id %>
- - token:
<%= @token %>
- - uid:
<%= uid %>
-
-
- APIを直接呼び出す場合は、リクエストヘッダーの access-token / client / uid に同じ値を設定してください。
-
-
- <% end %>
-
このリンクの有効期限は一度のみです。お心当たりのない操作の場合は、このメールを破棄してください。
diff --git a/api/app/mailers/reset_password_instructions.text.erb b/api/app/views/devise/mailer/reset_password_instructions.text.erb
similarity index 100%
rename from api/app/mailers/reset_password_instructions.text.erb
rename to api/app/views/devise/mailer/reset_password_instructions.text.erb
From e3936f4fa8458ac5c2c92e4a4b507c67db930488 Mon Sep 17 00:00:00 2001
From: hikahana <22.h.hanada.nutfes@gmail.com>
Date: Tue, 25 Nov 2025 21:01:55 +0900
Subject: [PATCH 7/7] =?UTF-8?q?fix:=20=E3=83=A1=E3=83=BC=E3=83=AB=E5=86=85?=
=?UTF-8?q?=E5=AE=B9=E6=9B=B4=E6=96=B0?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../reset_password_instructions.text.erb | 18 +++---------------
1 file changed, 3 insertions(+), 15 deletions(-)
diff --git a/api/app/views/devise/mailer/reset_password_instructions.text.erb b/api/app/views/devise/mailer/reset_password_instructions.text.erb
index f4f75e759..b18d2ed10 100644
--- a/api/app/views/devise/mailer/reset_password_instructions.text.erb
+++ b/api/app/views/devise/mailer/reset_password_instructions.text.erb
@@ -35,24 +35,12 @@
パスワード再設定のご案内
-<%= email_label %>
+<%= email_label %>、こんにちは。
-パスワード再設定のお申し込みを受け付けました。以下のURLへアクセスし、案内に従って新しいパスワードを設定してください。
+パスワード再設定のお申し込みを受け付けました。以下のURLからパスワード再設定ページへ進んでください。
<%= reset_link %>
-上記のリンクが開けない場合は、ブラウザのアドレスバーにコピー&ペーストしてご利用ください。
-
-<% if tokenised_link.present? && client_id.present? && uid.present? %>
-なお、手動でトークン情報を入力する場合や API 経由で再設定する場合には、以下の情報を使用します。
-
-client_id: <%= client_id %>
-token: <%= @token %>
-uid: <%= uid %>
-
-リクエストヘッダーには access-token / client / uid に同じ値を設定してください。
-<% end %>
-
-このリンクは一度きり有効です。お心当たりのない場合は本メールを破棄してください。
+このリンクの有効期限は一度のみです。お心当たりのない操作の場合は、このメールを破棄してください。
本メールは送信専用です。ご返信いただいても対応いたしかねますのでご了承ください。