👔 (oauth) add callback URI options
provides the option to define a callback URI following a request from the frontend; if not defined, it will automatically use the backend's default URI.
This commit is contained in:
@ -2,12 +2,14 @@ import { Context } from "elysia";
|
||||
import { returnReadResponse } from "../../../helpers/callback/httpResponse";
|
||||
import { githubRequestService } from "../services/http/githubRequest.service";
|
||||
|
||||
export const githubRequestController = async (ctx: Context) => {
|
||||
const loginUrl = await githubRequestService();
|
||||
export const githubRequestController = async (
|
||||
ctx: Context & { query: { callback?: string } }
|
||||
) => {
|
||||
const loginUrl = await githubRequestService(ctx.query.callback);
|
||||
return returnReadResponse(
|
||||
ctx.set,
|
||||
200,
|
||||
"Login URL generated successfully",
|
||||
String(loginUrl)
|
||||
loginUrl
|
||||
);
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user