File tree 1 file changed +1
-3
lines changed
pages/tutorials/github-oauth
1 file changed +1
-3
lines changed Original file line number Diff line number Diff line change @@ -74,11 +74,10 @@ import type { RequestEvent } from "@sveltejs/kit";
74
74
75
75
export async function GET(event : RequestEvent ): Promise <Response > {
76
76
const state = generateState ();
77
- const url = await github .createAuthorizationURL (state );
77
+ const url = github .createAuthorizationURL (state , [] );
78
78
79
79
event .cookies .set (" github_oauth_state" , state , {
80
80
path: " /" ,
81
- secure: import .meta .env .PROD ,
82
81
httpOnly: true ,
83
82
maxAge: 60 * 10 ,
84
83
sameSite: " lax"
@@ -96,7 +95,6 @@ Create an API route in `routes/login/github/callback/+server.ts` to handle the c
96
95
// routes/login/github/callback/+server.ts
97
96
import { generateSessionToken , createSession , setSessionTokenCookie } from " $lib/server/session" ;
98
97
import { github } from " $lib/server/oauth" ;
99
- import { OAuth2RequestError } from " arctic" ;
100
98
101
99
import type { RequestEvent } from " @sveltejs/kit" ;
102
100
import type { OAuth2Tokens } from " arctic" ;
You can’t perform that action at this time.
0 commit comments