Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
async oauth() {
const { ctx, config } = this;
const env = config.props['egg.env'];
const { code, r } = ctx.queries;
if (!r) {
throw new Error('INVALID R');
}
if (!code) {
throw new Error('INVALID CODE');
}
// await ctx.service.oauth.getAccessToken(code);
let redirect = r;
if (r.indexOf('?') > -1) {
redirect += '&code=' + code;
} else {
async debugger() {
const { ctx, config } = this;
await ctx.render('debugger.html', { env: config.props['egg.env'] });
}
}