Skip to content

feat: allow external services to be authable #9996

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 21 commits into from
Oct 3, 2023
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Fix href
  • Loading branch information
kylecarbs committed Oct 2, 2023
commit 0acc3a749245c77e1843d5eacb6ff6ba4dfea78a
5 changes: 2 additions & 3 deletions site/src/pages/ExternalAuthPage/ExternalAuthPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import {
} from "api/api";
import { usePermissions } from "hooks";
import { type FC } from "react";
import { useNavigate, useParams } from "react-router-dom";
import { useParams } from "react-router-dom";
import ExternalAuthPageView from "./ExternalAuthPageView";
import { ApiErrorResponse } from "api/errors";
import { isAxiosError } from "axios";
Expand All @@ -16,7 +16,6 @@ const ExternalAuthPage: FC = () => {
if (!provider) {
throw new Error("provider must exist");
}
const navigate = useNavigate();
const permissions = usePermissions();
const queryClient = useQueryClient();
const getExternalAuthProviderQuery = useQuery({
Expand Down Expand Up @@ -73,7 +72,7 @@ const ExternalAuthPage: FC = () => {
!getExternalAuthProviderQuery.data.authenticated &&
!getExternalAuthProviderQuery.data.device
) {
navigate(`/external-auth/${provider}/callback`);
window.location.href = `/external-auth/${provider}/callback`;
return null;
}

Expand Down