👔 (oauth) add callback URI option for google
Adding a callback option to the Google OAuth provider used to define the OAuth callback URI. If not defined, the callback URI will use the default value in the .env file.
This commit is contained in:
@ -3,9 +3,11 @@ import { mainErrorHandler } from "../../../helpers/error/handler";
|
||||
import { googleRequestService } from "../services/http/googleRequest.service";
|
||||
import { returnReadResponse } from "../../../helpers/callback/httpResponse";
|
||||
|
||||
export const googleRequestController = async (ctx: Context) => {
|
||||
export const googleRequestController = async (
|
||||
ctx: Context & { query: { callback?: string } }
|
||||
) => {
|
||||
try {
|
||||
const loginUrl = await googleRequestService();
|
||||
const loginUrl = await googleRequestService(ctx.query.callback);
|
||||
return returnReadResponse(
|
||||
ctx.set,
|
||||
200,
|
||||
|
||||
Reference in New Issue
Block a user