forked from nextauthjs/next-auth
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix AuthHandler, add getServerSession
- Loading branch information
1 parent
59d6385
commit ac0dbae
Showing
8 changed files
with
98 additions
and
243 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
This file was deleted.
Oops, something went wrong.
14 changes: 10 additions & 4 deletions
14
apps/playground-sveltekit/src/routes/api/auth/[...nextauth]/+server.ts
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,8 +1,14 @@ | ||
import SvelteKitAuth from "next-auth-sveltekit" | ||
import GitHub from 'next-auth-core/dist/providers/github'; | ||
import GitHub from 'next-auth-core/providers/github'; | ||
import { | ||
GITHUB_CLIENT_ID, | ||
GITHUB_CLIENT_SECRET, | ||
} from "$env/static/private" | ||
|
||
export const { GET, POST } = SvelteKitAuth({ | ||
export const authOptions = { | ||
providers: [ | ||
GitHub({ clientId: process.env.GITHUB_ID!, clientSecret: process.env.GITHUB_SECRET! }), | ||
GitHub({ clientId: GITHUB_CLIENT_ID, clientSecret: GITHUB_CLIENT_SECRET }), | ||
] | ||
}) | ||
} | ||
|
||
export const { GET, POST } = SvelteKitAuth(authOptions) |
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
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.