Compare commits
3 commits
856da3fdc1
...
8cb023dc61
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
8cb023dc61 | ||
| 38db637495 | |||
| cbcd8904b3 |
5 changed files with 9 additions and 8 deletions
|
|
@ -33,7 +33,7 @@ services:
|
||||||
|
|
||||||
rauthy:
|
rauthy:
|
||||||
container_name: rauthy-dev
|
container_name: rauthy-dev
|
||||||
image: ghcr.io/sebadob/rauthy:0.30.2
|
image: ghcr.io/sebadob/rauthy:0.31.2
|
||||||
environment:
|
environment:
|
||||||
- LOCAL_TEST=true
|
- LOCAL_TEST=true
|
||||||
- SMTP_URL=mailcrab
|
- SMTP_URL=mailcrab
|
||||||
|
|
|
||||||
|
|
@ -19,15 +19,16 @@ defmodule Mv.Accounts.User do
|
||||||
Currently password and SSO with Rauthy as OIDC provider
|
Currently password and SSO with Rauthy as OIDC provider
|
||||||
"""
|
"""
|
||||||
authentication do
|
authentication do
|
||||||
session_identifier Application.get_env(:mv, :session_identifier)
|
session_identifier Application.compile_env(:mv, :session_identifier, :jti)
|
||||||
|
|
||||||
tokens do
|
tokens do
|
||||||
enabled? true
|
enabled? true
|
||||||
token_resource Mv.Accounts.Token
|
token_resource Mv.Accounts.Token
|
||||||
|
|
||||||
require_token_presence_for_authentication? Application.get_env(
|
require_token_presence_for_authentication? Application.compile_env(
|
||||||
:mv,
|
:mv,
|
||||||
:require_token_presence_for_authentication
|
:require_token_presence_for_authentication,
|
||||||
|
false
|
||||||
)
|
)
|
||||||
|
|
||||||
store_all_tokens? true
|
store_all_tokens? true
|
||||||
|
|
|
||||||
|
|
@ -13,7 +13,7 @@ defmodule Mv.Accounts.User.Senders.SendNewUserConfirmationEmail do
|
||||||
@impl true
|
@impl true
|
||||||
def send(user, token, _) do
|
def send(user, token, _) do
|
||||||
new()
|
new()
|
||||||
# TODO: Replace with your email
|
# Replace with email from env
|
||||||
|> from({"noreply", "noreply@example.com"})
|
|> from({"noreply", "noreply@example.com"})
|
||||||
|> to(to_string(user.email))
|
|> to(to_string(user.email))
|
||||||
|> subject("Confirm your email address")
|
|> subject("Confirm your email address")
|
||||||
|
|
|
||||||
|
|
@ -13,7 +13,7 @@ defmodule Mv.Accounts.User.Senders.SendPasswordResetEmail do
|
||||||
@impl true
|
@impl true
|
||||||
def send(user, token, _) do
|
def send(user, token, _) do
|
||||||
new()
|
new()
|
||||||
# TODO: Replace with your email
|
# Replace with email from env
|
||||||
|> from({"noreply", "noreply@example.com"})
|
|> from({"noreply", "noreply@example.com"})
|
||||||
|> to(to_string(user.email))
|
|> to(to_string(user.email))
|
||||||
|> subject("Reset your password")
|
|> subject("Reset your password")
|
||||||
|
|
|
||||||
|
|
@ -33,8 +33,8 @@ defmodule MvWeb.AuthController do
|
||||||
caused_by: %Ash.Error.Forbidden{
|
caused_by: %Ash.Error.Forbidden{
|
||||||
errors: [%AshAuthentication.Errors.CannotConfirmUnconfirmedUser{}]
|
errors: [%AshAuthentication.Errors.CannotConfirmUnconfirmedUser{}]
|
||||||
}
|
}
|
||||||
}} -> gettext(
|
}} ->
|
||||||
"""
|
gettext("""
|
||||||
You have already signed in another way, but have not confirmed your account.
|
You have already signed in another way, but have not confirmed your account.
|
||||||
You can confirm your account using the link we sent to you, or by resetting your password.
|
You can confirm your account using the link we sent to you, or by resetting your password.
|
||||||
""")
|
""")
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue