-
Notifications
You must be signed in to change notification settings - Fork 36
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feat(auth): Handle resetPassword and Invite user #43
Changes from 5 commits
2e20d7b
db7f8dd
046eedd
dc57422
43a351d
0833baf
7b7c13a
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -71,7 +71,7 @@ enabled = true | |
# in emails. | ||
site_url = "http://localhost:5173/" | ||
# A list of *exact* URLs that auth providers are permitted to redirect to post authentication. | ||
additional_redirect_urls = ["https://localhost:5173/auth-callback/index.html"] | ||
additional_redirect_urls = ["https://localhost:5173/auth-callback.html"] | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. don't you need to update the documentation following this change? |
||
# How long tokens are valid for, in seconds. Defaults to 3600 (1 hour), maximum 604,800 (1 week). | ||
jwt_expiry = 3600 | ||
# If disabled, the refresh token will never expire. | ||
|
@@ -91,10 +91,9 @@ double_confirm_changes = true | |
# If enabled, users need to confirm their email address before signing in. | ||
enable_confirmations = false | ||
|
||
# Uncomment to customize email template | ||
# [auth.email.template.invite] | ||
# subject = "You have been invited" | ||
# content_path = "./supabase/templates/invite.html" | ||
[auth.email.template.invite] | ||
subject = "You've been invited to use Atomic CRM" | ||
content_path = "./supabase/templates/invite.html" | ||
|
||
[auth.email.template.recovery] | ||
subject = "Reset Password" | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,90 @@ | ||
<!doctype html> | ||
<html> | ||
<head> | ||
<style> | ||
body { | ||
font-family: Arial, sans-serif; | ||
background-color: #f4f4f4; | ||
margin: 0; | ||
padding: 0; | ||
} | ||
.container { | ||
width: 100%; | ||
max-width: 600px; | ||
margin: 0 auto; | ||
background-color: #ffffff; | ||
padding: 20px; | ||
border-radius: 8px; | ||
box-shadow: 0 0 10px rgba(0, 0, 0, 0.1); | ||
} | ||
.header { | ||
text-align: center; | ||
padding: 10px 0; | ||
} | ||
.header h2 { | ||
margin: 0; | ||
color: #333333; | ||
} | ||
.content { | ||
padding: 20px; | ||
line-height: 1.6; | ||
color: #555555; | ||
} | ||
.content p { | ||
margin: 0 0 10px; | ||
} | ||
.button { | ||
display: block; | ||
width: 200px; | ||
margin: 20px auto; | ||
padding: 10px; | ||
text-align: center; | ||
background-color: #007bff; | ||
color: #ffffff; | ||
text-decoration: none; | ||
border-radius: 5px; | ||
} | ||
.footer { | ||
text-align: center; | ||
padding: 10px 0; | ||
font-size: 12px; | ||
color: #777777; | ||
} | ||
</style> | ||
</head> | ||
<body> | ||
<div class="container"> | ||
<div class="header"> | ||
<h2>Confirm your account</h2> | ||
</div> | ||
<div class="content"> | ||
<p>Welcome to Atomic CRM.</p> | ||
<p> | ||
You've been invited to join the (Name) organization. Confirm | ||
your address below: | ||
Comment on lines
+63
to
+64
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This too looks like something that we should document (replacing the organization name in the template) |
||
</p> | ||
<a | ||
href="{{ .ConfirmationURL }}auth-callback.html" | ||
class="button" | ||
>Confirm my account</a | ||
> | ||
<p> | ||
<strong>Warning:</strong> If the password reset request did | ||
not originate from you, please contact us immediately as | ||
this may be a fraudulent attempt. | ||
</p> | ||
<p>See you soon!</p> | ||
<p>The Atomic CRM team</p> | ||
</div> | ||
<div class="footer"> | ||
<p> | ||
If the activation link doesn’t work, | ||
<a | ||
href="mailto:support@react-admin-enterprise-edition.zendesk.com" | ||
>contact us</a | ||
>. | ||
</p> | ||
</div> | ||
</div> | ||
</body> | ||
</html> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nitpick: there is no 3.0.1. You should require a 3.1.0 instead.