Skip to content

Commit

Permalink
fix: issues from useOpenIdConfig refactor
Browse files Browse the repository at this point in the history
  • Loading branch information
davidlougheed committed Aug 20, 2024
1 parent c9323d6 commit 57b6fc6
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/autoAuthenticate.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ export const useAutoAuthenticate = (): AutoAuthenticateState => {
const isAutoAuthenticating = useIsAutoAuthenticating();

const isAuthenticated = useIsAuthenticated();
const openIdConfig = useOpenIdConfig();
const { data: openIdConfig } = useOpenIdConfig();
const performAuth = usePerformAuth();

const authzEndpoint = openIdConfig?.["authorization_endpoint"];
Expand Down
4 changes: 2 additions & 2 deletions src/performAuth.ts
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ export const performAuth = async (

export const usePerformAuth = () => {
const { authCallbackUrl, clientId, scope } = useBentoAuthContext();
const openIdConfig = useOpenIdConfig();
const { data: openIdConfig } = useOpenIdConfig();
const authorizationEndpoint = openIdConfig?.["authorization_endpoint"];
return useCallback(async () => {
if (!authCallbackUrl || !clientId) {
Expand Down Expand Up @@ -99,7 +99,7 @@ export const useHandleCallback = (
const navigate = useNavigate();
const location = useLocation();
const { authCallbackUrl, clientId } = useBentoAuthContext();
const oidcConfig = useOpenIdConfig();
const { data: oidcConfig } = useOpenIdConfig();
const isAuthenticated = useIsAuthenticated();
const defaultAuthCodeCallback = useDefaultAuthCodeCallback(onSuccessfulAuthentication);

Expand Down
2 changes: 1 addition & 1 deletion src/performSignOut.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ export const usePerformSignOut = () => {
const dispatch = useDispatch();
const { clientId, postSignOutUrl } = useBentoAuthContext();
const { idToken } = useAuthState();
const openIdConfig = useOpenIdConfig();
const { data: openIdConfig } = useOpenIdConfig();
const endSessionEndpoint = openIdConfig?.end_session_endpoint;

return useCallback(() => {
Expand Down

0 comments on commit 57b6fc6

Please sign in to comment.