mirror of
https://github.com/ArthurDanjou/artdanj-api.git
synced 2026-01-25 01:00:28 +01:00
Testing Oauth
This commit is contained in:
@@ -12,16 +12,17 @@ Route.group(() => {
|
||||
Route.get('/google/callback', 'AuthController.google')
|
||||
Route.get('/discord/callback', 'AuthController.discord')
|
||||
|
||||
Route.get('/twitter', async ({ally}) => {
|
||||
Route.get('/twitter', async ({ ally}) => {
|
||||
return ally.use('twitter').redirect()
|
||||
})
|
||||
Route.get('/github', async ({ally}) => {
|
||||
Route.get('/github', async ({ request, session, ally}) => {
|
||||
await session.put('redirect', request.input('redirect'))
|
||||
return ally.use('github').redirect()
|
||||
})
|
||||
Route.get('/google', async ({ally}) => {
|
||||
Route.get('/google', async ({ ally}) => {
|
||||
return ally.use('google').redirect()
|
||||
})
|
||||
Route.get('/discord', async ({ally}) => {
|
||||
Route.get('/discord', async ({ ally}) => {
|
||||
return ally.use('discord').redirect()
|
||||
})
|
||||
}).prefix('/auth')
|
||||
|
||||
Reference in New Issue
Block a user