This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
export const async function asyncForEach(array, callback) { | |
for (let index = 0; index < array.length; index++) { | |
await callback(array[index], index, array) | |
} | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
async authorize({ request, response }) { | |
const { response_type } = request.get() | |
try { | |
// Check if OAuth flow is Authorization Code Grant Request | |
if (response_type !== Env.get('OAUTH2_FLOW_TYPE')) { | |
response.badRequest() | |
} | |
// Redirect to FusionAuth |
NewerOlder