🚩 (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:
@ -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;
|
||||
|
||||
Reference in New Issue
Block a user