mirror of
https://github.com/koreanbots/core.git
synced 2025-12-16 06:20:24 +00:00
feat: created discord login endpoint
This commit is contained in:
parent
01fd8ed40f
commit
ddb4db0070
8
pages/api/auth/discord/index.ts
Normal file
8
pages/api/auth/discord/index.ts
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
import { NextApiHandler, NextApiRequest, NextApiResponse } from 'next'
|
||||||
|
import { generateOauthURL } from '@utils/Tools'
|
||||||
|
|
||||||
|
const Discord: NextApiHandler = (_req: NextApiRequest, res: NextApiResponse) => {
|
||||||
|
res.redirect(301, generateOauthURL('discord', process.env.DISCORD_CLIENT_ID, process.env.DISCORD_SCOPE))
|
||||||
|
}
|
||||||
|
|
||||||
|
export default Discord
|
||||||
Loading…
x
Reference in New Issue
Block a user