Skip to content

Commit

Permalink
fix: jwtをstring型に修正
Browse files Browse the repository at this point in the history
  • Loading branch information
calloc134 committed Aug 14, 2023
1 parent a00ac0a commit 839adc6
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/frontend/src/lib/provider/urql/UrqlProvider.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import { useAuthn } from "src/lib/provider/authn/useAuthn";
const UrqlProvider = ({ children }: { children: ReactNode }) => {
// urqlクライアントの設定
const { isAuthenticated, getAccessToken } = useAuthn();
const [jwt, setJwt] = useState<string | undefined>();
const [jwt, setJwt] = useState("");

// urqlのauth Exchange用の設定
const authInit: (utilities: AuthUtilities) => Promise<AuthConfig> = useCallback(
Expand Down Expand Up @@ -50,7 +50,7 @@ const UrqlProvider = ({ children }: { children: ReactNode }) => {
console.debug("logto_api_resource in refreshAuth", logto_api_resource);

// トークンの取得
const jwt = await getAccessToken(is_dev ? "" : logto_api_resource);
const jwt = (await getAccessToken(is_dev ? "" : logto_api_resource)) || "";
setJwt(jwt);
},
addAuthToOperation(operation) {
Expand Down

0 comments on commit 839adc6

Please sign in to comment.