These changes include: 1. Replacing the app token with a standard authorization barrier. 2. Changing the response body in the OAuth request by wrapping the endpoint link with a structure instead of placing it in the callback payload data.
19 lines
605 B
TypeScript
19 lines
605 B
TypeScript
import { Context } from "elysia";
|
|
import { mainErrorHandler } from "../../../helpers/error/handler";
|
|
import { getOauthProvidersService } from "../services/http/getOauthProviders.service";
|
|
import { returnReadResponse } from "../../../helpers/callback/httpResponse";
|
|
|
|
export const getOauthProvidersController = (ctx: Context) => {
|
|
try {
|
|
const oauthProviderServices = getOauthProvidersService();
|
|
return returnReadResponse(
|
|
ctx.set,
|
|
200,
|
|
"Getting all oauth available list",
|
|
oauthProviderServices
|
|
);
|
|
} catch (error) {
|
|
return mainErrorHandler(ctx.set, error);
|
|
}
|
|
};
|