mirror of
https://github.com/ArthurDanjou/artdanj-api.git
synced 2026-02-01 20:37:49 +01:00
Testing Oauth
This commit is contained in:
@@ -1,6 +1,7 @@
|
|||||||
import {HttpContextContract} from '@ioc:Adonis/Core/HttpContext'
|
import {HttpContextContract} from '@ioc:Adonis/Core/HttpContext'
|
||||||
import User from "App/Models/User";
|
import User from "App/Models/User";
|
||||||
import {AllyUserContract} from "@ioc:Adonis/Addons/Ally";
|
import {AllyUserContract} from "@ioc:Adonis/Addons/Ally";
|
||||||
|
import Logger from "@ioc:Adonis/Core/Logger";
|
||||||
|
|
||||||
export default class AuthController {
|
export default class AuthController {
|
||||||
|
|
||||||
@@ -106,6 +107,8 @@ export default class AuthController {
|
|||||||
const redirected_url = await session.get('redirect')
|
const redirected_url = await session.get('redirect')
|
||||||
await session.forget('redirect')
|
await session.forget('redirect')
|
||||||
|
|
||||||
|
Logger.debug(redirected_url)
|
||||||
|
|
||||||
if (github.accessDenied()) {
|
if (github.accessDenied()) {
|
||||||
return response.status(403).send({
|
return response.status(403).send({
|
||||||
message: 'Access Denied!'
|
message: 'Access Denied!'
|
||||||
|
|||||||
Reference in New Issue
Block a user