Skip to content

Commit 440b961

Browse files
committed
fix: update callbackURL in authentication components to use environment variable
1 parent 31274af commit 440b961

2 files changed

Lines changed: 3 additions & 3 deletions

File tree

components/auth/LoginWrapper.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,7 @@ const LoginWrapper = ({ setLoadingState }: LoginWrapperProps) => {
129129
await authClient.signIn.social(
130130
{
131131
provider: 'google',
132-
callbackURL: callbackUrl,
132+
callbackURL: process.env.NEXT_PUBLIC_APP_URL || '/',
133133
},
134134
{
135135
onRequest: () => {
@@ -174,7 +174,7 @@ const LoginWrapper = ({ setLoadingState }: LoginWrapperProps) => {
174174
email: values.email,
175175
password: values.password,
176176
rememberMe: true,
177-
callbackURL: callbackUrl,
177+
callbackURL: process.env.NEXT_PUBLIC_APP_URL || '/',
178178
},
179179
{
180180
onRequest: () => {

components/auth/SignupWrapper.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ const SignupWrapper = ({
2929
await authClient.signIn.social(
3030
{
3131
provider: 'google',
32-
callbackURL: 'http://localhost:3000',
32+
callbackURL: process.env.NEXT_PUBLIC_APP_URL || '/',
3333
},
3434
{
3535
onRequest: () => {

0 commit comments

Comments
 (0)