Skip to content

Commit 61acf60

Browse files
committed
chore: add github auth
Squashed commit of the following: commit 213bc6730968015baca5ec91a03eda2a9076dca8 Author: Wojtek Majewski <wojciech.majewski@pm.me> Date: Sun May 4 17:02:44 2025 +0200 refactor: unify flow run page components and update navigation paths - Merged dual-panel and single-page flow run components into a single, reusable structure - Updated routing logic to remove redundant redirects and streamline navigation - Changed links in runs list to point directly to individual run pages instead of dual-panel view - Simplified flow run provider to handle data fetching and routing consistently across pages - Minor code cleanup and formatting adjustments for clarity and maintainability commit 0f3e38a Author: Wojtek Majewski <wojciech.majewski@pm.me> Date: Sun May 4 16:57:36 2025 +0200 feat: add GitHub OAuth provider setup instructions and implement GitHub sign-in button - Updated README to include steps for configuring GitHub OAuth in the local setup - Added a new GithubButton component for initiating GitHub OAuth sign-in - Integrated the GitHub sign-in button into sign-in and sign-up pages with UI enhancements - Implemented OAuth flow handling with redirection to GitHub and callback URL - Improved visual separation with "Or" divider in auth pages - Made minor formatting and structural adjustments for clarity and consistency commit f5ab86d Author: Wojtek Majewski <wojciech.majewski@pm.me> Date: Sun May 4 16:48:45 2025 +0200 refactor: update saveWebsite to return website object and adjust return value - Changed saveWebsite call to destructure website from its result - Updated function to return website instead of websiteData commit 07be951 Author: Wojtek Majewski <wojciech.majewski@pm.me> Date: Sun May 4 16:36:40 2025 +0200 feat: add user_id to website data and database schema, update save logic, and enhance security policies - Introduced user_id field in website data input and database schema - Updated saveWebsite function to include user_id - Modified migration to add user_id column and related indexes - Created secure wrapper function for starting analyze_website flow with user context - Adjusted permissions and policies for row-level security and user access control - Updated dependencies and lockfile for new modules and internal packages
1 parent 05bf848 commit 61acf60

File tree

15 files changed

+338
-230
lines changed

15 files changed

+338
-230
lines changed

examples/playground/README.md

Lines changed: 18 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -81,15 +81,31 @@ If you wish to just develop locally and not deploy to Vercel, [follow the steps
8181

8282
Both `NEXT_PUBLIC_SUPABASE_URL` and `NEXT_PUBLIC_SUPABASE_ANON_KEY` can be found in [your Supabase project's API settings](https://app.supabase.com/project/_/settings/api)
8383

84-
5. You can now run the Next.js local development server:
84+
5. Set up GitHub OAuth provider:
85+
86+
- Go to [GitHub Developer Settings](https://github.com/settings/developers)
87+
- Click "New OAuth App"
88+
- Fill in the form:
89+
- Application name: (Your app name)
90+
- Homepage URL: `http://localhost:3000`
91+
- Authorization callback URL: `http://localhost:3000/auth/callback`
92+
- Click "Register application"
93+
- Copy the Client ID
94+
- Generate a new Client Secret and copy it
95+
- In your Supabase dashboard, go to Authentication > Providers
96+
- Find GitHub and enable it
97+
- Enter your GitHub Client ID and Client Secret
98+
- Save changes
99+
100+
6. You can now run the Next.js local development server:
85101

86102
```bash
87103
npm run dev
88104
```
89105

90106
The starter kit should now be running on [localhost:3000](http://localhost:3000/).
91107

92-
6. This template comes with the default shadcn/ui style initialized. If you instead want other ui.shadcn styles, delete `components.json` and [re-install shadcn/ui](https://ui.shadcn.com/docs/installation/next)
108+
7. This template comes with the default shadcn/ui style initialized. If you instead want other ui.shadcn styles, delete `components.json` and [re-install shadcn/ui](https://ui.shadcn.com/docs/installation/next)
93109

94110
> Check out [the docs for Local Development](https://supabase.com/docs/guides/getting-started/local-development) to also run Supabase locally.
95111

examples/playground/app/(auth-pages)/sign-in/page.tsx

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
import { signInAction } from '@/app/actions';
44
import { FormMessage, Message } from '@/components/form-message';
5+
import { GithubButton } from '@/components/github-button';
56
import { SubmitButton } from '@/components/submit-button';
67
import { Input } from '@/components/ui/input';
78
import { Label } from '@/components/ui/label';
@@ -82,6 +83,12 @@ export default function Login({
8283
<SubmitButton pendingText="Signing In..." formAction={signInAction}>
8384
Sign in
8485
</SubmitButton>
86+
<div className="relative flex py-4 items-center">
87+
<div className="flex-grow border-t border-muted"></div>
88+
<span className="flex-shrink mx-4 text-muted-foreground text-sm">Or</span>
89+
<div className="flex-grow border-t border-muted"></div>
90+
</div>
91+
<GithubButton />
8592
<FormMessage message={message} />
8693
</div>
8794
</form>

examples/playground/app/(auth-pages)/sign-up/page.tsx

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import { signUpAction } from "@/app/actions";
22
import { FormMessage, Message } from "@/components/form-message";
3+
import { GithubButton } from "@/components/github-button";
34
import { SubmitButton } from "@/components/submit-button";
45
import { Input } from "@/components/ui/input";
56
import { Label } from "@/components/ui/label";
@@ -41,6 +42,12 @@ export default async function Signup(props: {
4142
<SubmitButton formAction={signUpAction} pendingText="Signing up...">
4243
Sign up
4344
</SubmitButton>
45+
<div className="relative flex py-4 items-center">
46+
<div className="flex-grow border-t border-muted"></div>
47+
<span className="flex-shrink mx-4 text-muted-foreground text-sm">Or</span>
48+
<div className="flex-grow border-t border-muted"></div>
49+
</div>
50+
<GithubButton />
4451
<FormMessage message={searchParams} />
4552
</div>
4653
</form>

examples/playground/app/websites/runs/[run_id]/dual-panel/page.tsx

Lines changed: 0 additions & 164 deletions
This file was deleted.

0 commit comments

Comments
 (0)