Skip to content

Commit

Permalink
Get origin dynamically
Browse files Browse the repository at this point in the history
  • Loading branch information
WizzyGeek committed Jun 17, 2024
1 parent e0978d8 commit 038f3a5
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 5 deletions.
3 changes: 0 additions & 3 deletions src/constants.tsx

This file was deleted.

3 changes: 1 addition & 2 deletions src/pages/login.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ import Card from '../components/Card';
import { SessionContext, supabase } from '../supabase';
import './mainbg.scss';
import { useNavigate } from 'react-router-dom';
import { ORIGIN } from '../constants';


export default function Login() {
Expand All @@ -26,7 +25,7 @@ export default function Login() {
onClick={() => {supabase.auth.signInWithOAuth({
provider: "google",
options: {
redirectTo: `${ORIGIN}/auth/`
redirectTo: `${window.location.origin}/auth/`
}
})}}>
<div className='bg-yellow-400 p-2 rounded-l-md'><img src='/google.svg' className=' h-8 w-8'/></div>
Expand Down

0 comments on commit 038f3a5

Please sign in to comment.