🚩 (flags) send callback uri

Send the frontend callback URI to the backend as required by the OAuth vendor. The frontend explicitly sends the
callback URI for flexibility in the backend system.
This commit is contained in:
2025-09-03 23:17:24 +07:00
parent 8b43c65886
commit 8b2d74ed3f

View File

@ -2,8 +2,14 @@
import { api } from "@/shared/api/connector";
export const SendCallbackToServer = async (data: string, provider: string) => {
const backendHandlerUrl = `auth/${provider}/callback/`;
const frontendHandlerUrl = `${process.env
.APP_DOMAIN!}/auth/callback/${provider}`;
try {
const response = await api.get(`auth/${provider}/callback${data}`);
const response = await api.get(
`${backendHandlerUrl}${data}&callbackURI=${frontendHandlerUrl}`
);
const result = await response.json();
return result;