Skip to content

Commit 9f5acc5

Browse files
TudorZgimbaubalazsorban44ndom91
authored
docs: Fix the hooks code in oauth getting started (#6193)
* Fix the hooks code in oauth getting started Fixes #6192 * Apply suggestions from code review Co-authored-by: Nico Domino <[email protected]> Co-authored-by: Balázs Orbán <[email protected]> Co-authored-by: Nico Domino <[email protected]>
1 parent 0bbc824 commit 9f5acc5

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

docs/docs/getting-started/02-oauth-tutorial.mdx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -36,8 +36,8 @@ import GithubProvider from "next-auth/providers/github"
3636
export default NextAuth({
3737
providers: [
3838
GithubProvider({
39-
clientId: /* We'll fill this later */,
40-
clientSecret: /* We'll fill this later*/,
39+
clientId: process.env.GITHUB_ID,
40+
clientSecret: process.env.GITHUB_SECRET,
4141
}),
4242
],
4343
})
@@ -100,7 +100,7 @@ import { useSession, signIn, signOut } from "next-auth/react"
100100

101101
export default function CamperVanPage() {
102102
const { data: session, status } = useSession()
103-
const userEmail = session.user.email
103+
const userEmail = session?.user.email;
104104

105105
if (status === "loading") {
106106
return <p>Hang on there...</p>

0 commit comments

Comments
 (0)