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: Handle HashRouter & BrowserRouter for Supabase redirections #67

Merged
merged 7 commits into from
Aug 8, 2024

Conversation

arimet
Copy link
Contributor

@arimet arimet commented Aug 7, 2024

Problem

As a developer, I want to be able to choose between the HashRouter and the BrowserRouter.

Solution

Modify the DataProvider's handleCallback function and useSupabaseAccessToken to retrieve query params when using a URL Hash or history url.

Other

Improve documentation

How to test

BrowserRouter

  1. Launch demo
  2. Through the Authentication dashboard sent a reset email to an user. You can see the email sent in Inbucket. Instead of clicking the link, copy it and change the redirect_to parameter from http://localhost:8000 to http://localhost:8000/auth-callback.

HashRouter

  1. Remove from demo App.ts
  2. Check that public/auth-callback/index.html is created
  3. Same step as BrowserRouter 3, but set redirect_to with http://localhost:8000/auth-callback/index.html

@arimet arimet added the RFR label Aug 7, 2024
@arimet arimet self-assigned this Aug 7, 2024
packages/ra-supabase/README.md Outdated Show resolved Hide resolved
packages/ra-supabase/README.md Outdated Show resolved Hide resolved
packages/ra-supabase/README.md Outdated Show resolved Hide resolved
packages/ra-supabase/README.md Outdated Show resolved Hide resolved
@arimet arimet requested a review from djhi August 8, 2024 09:05
packages/ra-supabase/README.md Outdated Show resolved Hide resolved
packages/ra-supabase/README.md Outdated Show resolved Hide resolved
@arimet arimet force-pushed the feat/allow-hash-router branch from 23cdfec to 4affe7b Compare August 8, 2024 09:53
@arimet arimet requested a review from djhi August 8, 2024 09:59
@djhi djhi added this to the 3.1.0 milestone Aug 8, 2024
@djhi djhi merged commit 531eec3 into main Aug 8, 2024
5 checks passed
@djhi djhi deleted the feat/allow-hash-router branch August 8, 2024 10:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants