File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -25,7 +25,7 @@ export function signOut() {
2525}
2626
2727export function isSignedIn ( ) {
28- return ! ! localStorage . getItem ( LocalStorageKeys . AccessToken ) ;
28+ return ! ! localStorage . getItem ( LocalStorageKeys . AccessToken ) ?. trim ( ) ;
2929}
3030
3131export async function refreshAccessToken ( client : AxiosInstance ) {
Original file line number Diff line number Diff line change @@ -11,7 +11,7 @@ type HookReturnType = [
1111 Optional < AccessTokenResponse > ,
1212 boolean ,
1313 boolean ,
14- Optional < FetchBaseQueryError | SerializedError >
14+ Optional < FetchBaseQueryError | SerializedError | TypeError >
1515] ;
1616
1717export function useAuth ( ) : HookReturnType {
Original file line number Diff line number Diff line change 11import { getConfig } from '../../app/config' ;
2+ import { useAuth } from '../../hooks/useAuth' ;
23import Container from '@mui/material/Container' ;
34import CssBaseline from '@mui/material/CssBaseline' ;
45import Box from '@mui/material/Box' ;
@@ -10,7 +11,7 @@ import GitHubIcon from '@mui/icons-material/GitHub';
1011import Alert from '@mui/material/Alert' ;
1112import { useAuth } from '../../hooks/useAuth' ;
1213
13- const { redirectUrl , githubClientId } = getConfig ( ) ;
14+ const { githubClientId } = getConfig ( ) ;
1415
1516export default function Login ( ) {
1617 const [ , isLoading , , error ] = useAuth ( ) ;
@@ -50,7 +51,7 @@ export default function Login() {
5051 < Box component = "form" noValidate >
5152 < Button
5253 fullWidth
53- href = { `https://github.com/login/oauth/authorize?scope=user&client_id=${ githubClientId } &redirect_uri= ${ redirectUrl } ` }
54+ href = { `https://github.com/login/oauth/authorize?scope=user&client_id=${ githubClientId } ` }
5455 type = "submit"
5556 variant = "contained"
5657 sx = { { mt : 3 , mb : 2 } }
You can’t perform that action at this time.
0 commit comments