-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
reset password, new home page, little changes
- Loading branch information
1 parent
9fe3615
commit fd608db
Showing
20 changed files
with
914 additions
and
20 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
import {NextRequest, NextResponse} from "next/server"; | ||
import { cookies } from 'next/headers'; | ||
import {createClient} from "@/utils/supabase/server"; | ||
|
||
export async function GET(req: NextRequest) { | ||
const requestUrl = new URL(req.nextUrl.href) | ||
const code = requestUrl.searchParams.get('code') | ||
|
||
if( code ) { | ||
const supabase = createClient() | ||
const { error } = await supabase.auth.exchangeCodeForSession(code) | ||
|
||
return NextResponse.redirect(new URL(`${req.nextUrl.origin}/auth/update_password`, req.nextUrl.href)) | ||
} | ||
|
||
console.log({error : 'ERROR: Invalid auth code or no auth code found'}, { status: 500 }) | ||
|
||
return NextResponse.redirect(new URL(`${req.nextUrl.origin}/auth`, req.nextUrl.href)) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
fd608db
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Deploy preview for iiitvcc ready!
✅ Preview
https://iiitvcc-gzoz1tsez-iiitv-coding-clubs-projects.vercel.app
Built with commit fd608db.
This pull request is being automatically deployed with vercel-action