create a handler to forward callback requests from the OAuth provider to the main backend system.
14 lines
304 B
TypeScript
14 lines
304 B
TypeScript
"use server";
|
|
import { api } from "@/shared/api/connector";
|
|
|
|
export const SendCallbackToServer = async (data: string) => {
|
|
try {
|
|
const response = await api.get(`auth/google/callback${data}`);
|
|
const result = await response.json();
|
|
|
|
return result;
|
|
} catch (error) {
|
|
throw error;
|
|
}
|
|
};
|