From ac257d1d2e1fba72530d4aa38acbd186e2509b22 Mon Sep 17 00:00:00 2001 From: Sven Czarnian Date: Sat, 5 Nov 2022 00:52:18 +0100 Subject: [PATCH] use the new login function --- src/components/login.tsx | 16 ++-------------- src/services/auth.ts | 12 ++++++++++++ 2 files changed, 14 insertions(+), 14 deletions(-) diff --git a/src/components/login.tsx b/src/components/login.tsx index e6c0848..6e332ba 100644 --- a/src/components/login.tsx +++ b/src/components/login.tsx @@ -2,7 +2,7 @@ import React, { useEffect, useState } from 'react'; import { Button } from 'primereact/button'; import { Card } from 'primereact/card'; import { useNavigate } from 'react-router-dom'; -import { Auth, Configuration, Session } from '../services'; +import { Auth, Session } from '../services'; import { BackendReturnStatus } from '../types'; export const Login: React.FC = () => { @@ -24,24 +24,12 @@ export const Login: React.FC = () => { if (loading) return <>; - const redirectToVatsim = () => { - const url = [ - Configuration.vatsim.authorizeUrl, - `?client_id=${Configuration.vatsim.clientId}`, - `&redirect_uri=${Configuration.resourceServer}/auth/vatsim`, - `&response_type=code`, - `&scope=full_name+vatsim_details`, - `&approval_prompt=auto`, - ].join(''); - window.location.replace(url); - } - const footer = (