From 65c513e4f13b9c31766286a605119e4f4caa87a3 Mon Sep 17 00:00:00 2001 From: Sidhin S Thomas Date: Fri, 6 Sep 2024 20:54:17 +0530 Subject: [PATCH] Fix auth provider API usage --- ui/App.tsx | 7 ++++++- ui/services/ping_service.ts | 2 +- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/ui/App.tsx b/ui/App.tsx index daf7456..1510e02 100644 --- a/ui/App.tsx +++ b/ui/App.tsx @@ -87,7 +87,12 @@ class App extends React.Component { } render(): ReactNode { - GetAuthDetails().then((response: any) => { console.log(response) }); + GetAuthDetails() + .then((response: any) => { + console.log(response); + localStorage.setItem('auth_provider', response.provider); + }); + return ( { export async function GetAuthDetails(): Promise { try { - const response = await fetch('/ping/auth_provider'); + const response = await fetch('/api/ping/auth_provider'); return JSON.parse(await response.text()); } catch (error) { return Promise.reject(error);