File tree Expand file tree Collapse file tree 4 files changed +21
-3
lines changed Expand file tree Collapse file tree 4 files changed +21
-3
lines changed Original file line number Diff line number Diff line change @@ -8,4 +8,5 @@ NEXT_PUBLIC_VHS_LOGIN_PAGE=true
8
8
NEXT_PUBLIC_STRIPE_PUBLIC_KEY = pk_test_51LB1oCGmzIbonMxd1rIlziq9mgp1oB7PZr0dBClbi4gCtilM4vpgq7qfvze0RXHbHEnII7bIIixYpSYcY0C8ZDxa00GfjVTDRi
9
9
NEXT_PUBLIC_POSTHOG_KEY = phc_JDNTRxeh2li2sQTRO0IcOYMJcp8fPs5nTK9TU751nQK
10
10
# This is the Analytics Proxy (AP) for PostHog.
11
- NEXT_PUBLIC_POSTHOG_HOST = https://ap.convex.dev
11
+ NEXT_PUBLIC_POSTHOG_HOST = https://ap.convex.dev
12
+ NEXT_PUBLIC_VERCEL_INTEGRATION_SLUG = convex-test
Original file line number Diff line number Diff line change @@ -8,4 +8,5 @@ NEXT_PUBLIC_AUTH0_BASE_URL=$VERCEL_BRANCH_URL
8
8
NEXT_PUBLIC_STRIPE_PUBLIC_KEY = pk_live_51LB1oCGmzIbonMxdgup6xlzEWt2iSA42yH5wBPGhqCwDnTgSD3PbH7y1U352IUyxTUP5BL7edcJR6PLx22x1DiAs00c7iyPHtB
9
9
NEXT_PUBLIC_POSTHOG_KEY = phc_JDNTRxeh2li2sQTRO0IcOYMJcp8fPs5nTK9TU751nQK
10
10
# This is the Analytics Proxy (AP) for PostHog.
11
- NEXT_PUBLIC_POSTHOG_HOST = https://ap.convex.dev
11
+ NEXT_PUBLIC_POSTHOG_HOST = https://ap.convex.dev
12
+ NEXT_PUBLIC_VERCEL_INTEGRATION_SLUG = convex
Original file line number Diff line number Diff line change @@ -3,6 +3,7 @@ import { Sheet } from "@ui/Sheet";
3
3
import { Button } from "@ui/Button" ;
4
4
import GithubLogo from "logos/github-logo.svg" ;
5
5
import GoogleLogo from "logos/google.svg" ;
6
+ import VercelLogo from "logos/vercel.svg" ;
6
7
import { Spinner } from "@ui/Spinner" ;
7
8
import React from "react" ;
8
9
import { useRouter } from "next/router" ;
@@ -130,6 +131,19 @@ export function LinkIdentityForm({
130
131
Continue with Google
131
132
</ Button >
132
133
) }
134
+ { providerHint === "vercel" && (
135
+ < Button
136
+ href = { `https://vercel.com/sso/integrations/${ process . env . NEXT_PUBLIC_VERCEL_INTEGRATION_SLUG } ?returnTo=/link_identity?resume=true` }
137
+ icon = { < VercelLogo className = "mr-2 dark:fill-white" /> }
138
+ size = "md"
139
+ variant = "neutral"
140
+ className = "w-fit"
141
+ loading = { status === "waitingForCookie" }
142
+ disabled = { status === "waitingForCookie" }
143
+ >
144
+ Continue with Vercel
145
+ </ Button >
146
+ ) }
133
147
</ div >
134
148
</ UIProvider >
135
149
</ >
Original file line number Diff line number Diff line change @@ -29,7 +29,9 @@ export default function VercelLogin() {
29
29
// We have a code query parameter, so we store it
30
30
// in session storage (so it's accessible once we're redirected back and redirect to the Auth0 login page.
31
31
setVercelCode ( query . code . toString ( ) ) ;
32
- void replace ( "/api/auth/login?connection=vercel" ) ;
32
+ void replace (
33
+ `/api/auth/login?connection=vercel${ query . returnTo ? `&returnTo=${ query . returnTo } ` : "" } ` ,
34
+ ) ;
33
35
}
34
36
35
37
// If both state and resume parameters are present,
You can’t perform that action at this time.
0 commit comments