lib sources restructuring
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
import { redirect } from '@sveltejs/kit';
|
||||
import type { RequestHandler } from './$types';
|
||||
import { getOAuthClient } from '$lib/google-server.js';
|
||||
import { authServer } from '$lib/google/index.js';
|
||||
|
||||
export const GET: RequestHandler = async ({ url }) => {
|
||||
try {
|
||||
@@ -17,7 +17,7 @@ export const GET: RequestHandler = async ({ url }) => {
|
||||
}
|
||||
|
||||
// Exchange code for tokens
|
||||
const oauth = getOAuthClient();
|
||||
const oauth = authServer.getOAuthClient();
|
||||
const { tokens } = await oauth.getToken(code);
|
||||
|
||||
if (!tokens.refresh_token || !tokens.access_token) {
|
||||
|
||||
Reference in New Issue
Block a user