This repository has been archived by the owner on Oct 2, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 25
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
6f1e421
commit a563c84
Showing
7 changed files
with
251 additions
and
53 deletions.
There are no files selected for viewing
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,4 @@ | ||
NEXTAUTH_URL= | ||
NEXTAUTH_SECRET= | ||
LINKEDIN_CLIENT_ID= | ||
LINKEDIN_CLIENT_SECRET= |
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
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,30 @@ | ||
import NextAuth from "next-auth"; | ||
import LinkedInProvider from "next-auth/providers/linkedin"; | ||
|
||
const authOptions = { | ||
providers: [ | ||
LinkedInProvider({ | ||
clientId: process.env.LINKEDIN_CLIENT_ID, | ||
clientSecret: process.env.LINKEDIN_CLIENT_SECRET, | ||
authorization: { | ||
params: { scope: "openid profile email" }, | ||
}, | ||
issuer: "https://www.linkedin.com/oauth", | ||
jwks_endpoint: "https://www.linkedin.com/oauth/openid/jwks", | ||
profile(profile, tokens) { | ||
const defaultImage = | ||
"https://cdn-icons-png.flaticon.com/512/174/174857.png"; | ||
return { | ||
id: profile.sub, | ||
name: profile.name, | ||
email: profile.email, | ||
image: profile.picture ?? defaultImage, | ||
}; | ||
}, | ||
}), | ||
], | ||
}; | ||
|
||
const handler = NextAuth(authOptions); | ||
|
||
export { authOptions, handler as GET, handler as POST }; |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,44 +1,33 @@ | ||
import Footer from "@/components/Footer"; | ||
import Header from "@/components/Header"; | ||
|
||
export default function Example() { | ||
export default function Page() { | ||
return ( | ||
<> | ||
<div className="min-h-full"> | ||
<Header /> | ||
<main className="-mt-24 pb-8"> | ||
<div className="mx-auto max-w-3xl px-4 sm:px-6 lg:max-w-7xl lg:px-8"> | ||
<h1 className="sr-only">Page title</h1> | ||
{/* Main 3 column grid */} | ||
<div className="grid grid-cols-1 items-start gap-4 lg:grid-cols-3 lg:gap-8"> | ||
{/* Left column */} | ||
<div className="grid grid-cols-1 gap-4 lg:col-span-2"> | ||
<section aria-labelledby="section-1-title"> | ||
<h2 className="sr-only" id="section-1-title"> | ||
Section title | ||
</h2> | ||
<div className="overflow-hidden rounded-lg bg-white shadow"> | ||
<div className="p-6">{/* Your content */}</div> | ||
</div> | ||
</section> | ||
</div> | ||
<div className="mx-auto max-w-3xl px-4 sm:px-6 lg:max-w-7xl lg:px-8"> | ||
<h1 className="sr-only">Page title</h1> | ||
{/* Main 3 column grid */} | ||
<div className="grid grid-cols-1 items-start gap-4 lg:grid-cols-3 lg:gap-8"> | ||
{/* Left column */} | ||
<div className="grid grid-cols-1 gap-4 lg:col-span-2"> | ||
<section aria-labelledby="section-1-title"> | ||
<h2 className="sr-only" id="section-1-title"> | ||
Section title | ||
</h2> | ||
<div className="overflow-hidden rounded-lg bg-white shadow"> | ||
<div className="p-6">{/* Your content */}</div> | ||
</div> | ||
</section> | ||
</div> | ||
|
||
{/* Right column */} | ||
<div className="grid grid-cols-1 gap-4"> | ||
<section aria-labelledby="section-2-title"> | ||
<h2 className="sr-only" id="section-2-title"> | ||
Section title | ||
</h2> | ||
<div className="overflow-hidden rounded-lg bg-white shadow"> | ||
<div className="p-6">{/* Your content */}</div> | ||
</div> | ||
</section> | ||
</div> | ||
{/* Right column */} | ||
<div className="grid grid-cols-1 gap-4"> | ||
<section aria-labelledby="section-2-title"> | ||
<h2 className="sr-only" id="section-2-title"> | ||
Section title | ||
</h2> | ||
<div className="overflow-hidden rounded-lg bg-white shadow"> | ||
<div className="p-6">{/* Your content */}</div> | ||
</div> | ||
</div> | ||
</main> | ||
<Footer /> | ||
</section> | ||
</div> | ||
</div> | ||
</> | ||
</div> | ||
); | ||
} |
Oops, something went wrong.