settings + reinvite players to lobby
This commit is contained in:
18
src/routes/login/+page.server.ts
Normal file
18
src/routes/login/+page.server.ts
Normal file
@@ -0,0 +1,18 @@
|
||||
import { redirect } from '@sveltejs/kit';
|
||||
import { auth } from '$lib/server/auth';
|
||||
import type { PageServerLoad } from './$types';
|
||||
|
||||
export const load: PageServerLoad = async (event) => {
|
||||
if (event.locals.user) redirect(302, '/');
|
||||
|
||||
const result = await auth.api.signInSocial({
|
||||
body: {
|
||||
provider: 'osu',
|
||||
callbackURL: '/'
|
||||
}
|
||||
});
|
||||
|
||||
if (result.url) redirect(302, result.url);
|
||||
|
||||
return {};
|
||||
};
|
||||
Reference in New Issue
Block a user