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

can't login nor see posts #9

Open
PrestigeDevop opened this issue Mar 8, 2024 · 5 comments
Open

can't login nor see posts #9

PrestigeDevop opened this issue Mar 8, 2024 · 5 comments

Comments

@PrestigeDevop
Copy link

PrestigeDevop commented Mar 8, 2024

hello , thanks for sharing this project , I've encounter some problems linking the project to supabase ..
I'm new to next and suabase ,

I've setup the env variables details and enable Supabase's authorizations settings ( Google and Github Client ID and Secret api),

but I couldn't login into the editor/posts route .

is there something I need to edit in Vercel or supabase ?
also idk how to fetch the articles from the db ,, should I upload it into supabase and if so how ?

@raphaelandrews
Copy link

raphaelandrews commented Mar 17, 2024

Are you unable to login only on the editor/posts route or on all protected routes? Which errors are you receiving? Are users being created?

@PrestigeDevop
Copy link
Author

Are you unable to login only on the editor/posts route or on all protected routes? Which errors are you receiving? Are users being created?

I can't authenticate users .I've enabled Github ,Google and Email in Spabase . but the login redirect me into the same page (reloading the website ) // might be wrong way to authenticate , the email option indeed create a user but it's hard coded by me so it's more prone to error -bugs .

is there any additional thing I need to do in the supabase backend i.e how can I upload the articles and sql file ?

I've a Vercel deployment but I need to fix it

@raphaelandrews
Copy link

I don't know if it's the same case I have. When I first tried to authenticate with Google, I couldn't authenticate and got redirected to localhost:3000 because I forgot to change the Site URL in Supabase. Authentication -> URL Configuration, and then I changed the site URL from localhost:3000 to my Vercel deployment URL.

If you're referring to the schema and dummy data, you can utilize the SQL Editor to create the tables. Then, navigate to the Table Editor, select the Posts table, and choose Insert -> Import data from CSV. However, if you create a post using the New Post button on the editor/posts route, the new post will be inserted into the Drafts table and won't be displayed on the homepage. You can check #8 to change this thing.

@PrestigeDevop
Copy link
Author

//Google OAuth it reload the page with this error in the console


supabase.co/rest/v1/profiles?select=*&id=eq.undefined
Request Method:
GET
Status Code:
404 Not Found

{
    "code": "42P01",
    "details": null,
    "hint": null,
    "message": "relation \"public.profiles\" does not exist"
}

@raphaelandrews
Copy link

Are you using triggers? Check #5

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

No branches or pull requests

2 participants