Skip to content
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

Merged
merged 7 commits into from
Aug 9, 2024

Conversation

arimet
Copy link
Collaborator

@arimet arimet commented Aug 8, 2024

Problem

As a new user, I want to know when I'm invited to join the CRM and configure my own password

Solution

Implement setPassword and Invite user via Supabase. Handle in HashRouter

How to test

Reset

  1. Launch demo
  2. From Login page go to ResetPasswordPage.
  3. Send recovery email and go to http://localhost:54324/
  4. Click on link and reset password

Invite user

  1. Go on Sales Create
  2. Create a new sales and go to http://localhost:54324/
  3. Click on mail and set password

@arimet arimet self-assigned this Aug 8, 2024
@slax57 slax57 self-requested a review August 8, 2024 13:47
Co-authored-by: Jonathan <125876152+jonathan-marmelab@users.noreply.github.com>
package.json Outdated
@@ -19,7 +19,7 @@
"papaparse": "^5.4.1",
"prop-types": "^15.8.1",
"ra-data-fakerest": "^5.1.1",
"ra-supabase": "^3.0.0",
"ra-supabase": "^3.0.1",
Copy link
Collaborator

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.

Suggested change
"ra-supabase": "^3.0.1",
"ra-supabase": "^3.1.0",

@@ -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"]
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

don't you need to update the documentation following this change?

Comment on lines +63 to +64
You've been invited to join the (Name) organization. Confirm
your address below:
Copy link
Collaborator

Choose a reason for hiding this comment

The 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)

@slax57
Copy link
Collaborator

slax57 commented Aug 8, 2024

Also, I think I found a small bug.
When you invite a new Admin, after they fill in their new password, they don't see the 'Users' view right away.
They need to sign out / sign in again to see it.

EDIT: You can probably ignore this: I seems this bug has been identified and fixed in #45

@arimet arimet merged commit fb5d76f into main Aug 9, 2024
5 checks passed
@arimet arimet deleted the feat/remove-browserrouter branch August 9, 2024 08:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants