Skip to content

Commit

Permalink
Fix auth provider API usage
Browse files Browse the repository at this point in the history
  • Loading branch information
ParadoxZero committed Sep 6, 2024
1 parent 8e7d5fe commit 65c513e
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
7 changes: 6 additions & 1 deletion ui/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,12 @@ class App extends React.Component<AppProps> {
}

render(): ReactNode {
GetAuthDetails().then((response: any) => { console.log(response) });
GetAuthDetails()
.then((response: any) => {
console.log(response);
localStorage.setItem('auth_provider', response.provider);
});

return (
<ConfigProvider theme={{
components: {
Expand Down
2 changes: 1 addition & 1 deletion ui/services/ping_service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ export async function PingRemote(): Promise<Object> {

export async function GetAuthDetails(): Promise<Object> {
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);
Expand Down

0 comments on commit 65c513e

Please sign in to comment.