Skip to content

Commit

Permalink
fix(oidc): Add null as union type into arguments for login, logout, r…
Browse files Browse the repository at this point in the history
…enewTokens functions (#1427) (release)
  • Loading branch information
ShimpeiKamiguchi authored Jul 26, 2024
1 parent 0394a6f commit 318de92
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions packages/react-oidc/src/ReactOidc.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ export const useOidc = (configurationName = defaultConfigurationName) => {

const login = (
callbackPath: string | undefined = undefined,
extras: StringMap = null,
extras: StringMap | null = null,
silentLoginOnly = false,
) => {
return getOidc(configurationName).loginAsync(
Expand All @@ -59,11 +59,13 @@ export const useOidc = (configurationName = defaultConfigurationName) => {
};
const logout = (
callbackPath: string | null | undefined = undefined,
extras: StringMap = null,
extras: StringMap | null = null,
) => {
return getOidc(configurationName).logoutAsync(callbackPath, extras);
};
const renewTokens = async (extras: StringMap = null): Promise<OidcAccessToken | OidcIdToken> => {
const renewTokens = async (
extras: StringMap | null = null,
): Promise<OidcAccessToken | OidcIdToken> => {
const tokens = await getOidc(configurationName).renewTokensAsync(extras);

return {
Expand Down

0 comments on commit 318de92

Please sign in to comment.